Nevertheless, here's the code:
jQuery.noConflict();
( function ( $ ) {
$(document).ready( function () {
// use $ object as usual, for example
$('#animated').delay(3000).show('slow');
});
} ( jQuery ) );
The trick here is that after calling jQuery.noConflict method, the global object 'jQuery' is passed to an anonymous self-calling function, which can further use the global jQuery variable ( $ ) as usual without worrying about polluting the global scope. Using this approach existing JavaScript code that uses jQuery library can be safely ported to an environment where other libraries like mootools or prorotype are used.