jquery noconflict
var dom = {};
dom.query = jQuery.noConflict( true );
4.13
8
var jq = $.noConflict(); // avoid conflict with other frameworks also using the dollar sign
jq(document).ready(function(){
jq("#demo").text("Hello World!");
});
Thank you!
8
0
4
6
// 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();
Thank you!
6
0
Are there any code examples left?
New code examples in category Javascript