var jq = $.noConflict(); // avoid conflict with other frameworks also using the dollar sign
jq(document).ready(function(){
jq("#demo").text("Hello World!");
});
var dom = {};
dom.query = jQuery.noConflict( true );
$.noConflict();
jQuery(document).ready(function(){
jQuery("button").click(function(){
jQuery("p").text("jQuery is still working!");
});
});
$.noConflict
/*allows other frameworks to use the $*/
// Do something with the new jQuery
dom.query( "div p" ).hide();
// Do something with another library's $()
$( "content" ).style.display = "none";
// Do something with another version of jQuery
jQuery( "div > p" ).hide();