method 1:
var $j = jQuery.noConflict();
// $j is now an alias to the jQuery function; creating the new alias is optional.
$j(document).ready(function() {
$j( "div" ).hide();
});
$j代表jquery库;
method 2:
jQuery.noConflict();
jQuery( document ).ready(function( $ ) {
// You can use the locally-scoped $ in here as an alias to jQuery.
$( "div" ).hide();
});
在函数中传参$
原文来自http://learn.jquery.com/using-jquery-core/avoid-conflicts-other-libraries/