Answer Posted / chaitanya
As other client side libraries like MooTools, Prototype can be used with jQuery and they also use $() as their global function and to define variables. This situation creates conflict as $() is used by jQuery and other library as their global function. To overcome from such situations, jQuery has introduced jQuery.noConflict().
Hide Copy Code
jQuery.noConflict();
// Use jQuery via jQuery(...)
jQuery(document).ready(function(){
jQuery("div").hide();
});
You can also use your own specific character in the place of $ sign in jQuery.
Hide Copy Code
var $j = jQuery.noConflict();
// Use jQuery via jQuery(...)
$j(document).ready(function(){
$j("div").hide();
});
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Define jquery connect?
What are the slow selectors in jquery? : jquery mobile
Define jquery filter?
What is jquery and what are the advantages?
What is cdn and how jquery is related to it?
explain width() vs css(‘width’) in jquery
What is the jQuery code to select all links inside the paragraph?
What is the use of toggle() method in jquery?
Explain how jquery works?
Which is the fastest selector in jQuery?
What is serialize() in jquery?
What are the advantages of minified version of jquery?
How to validate phone number using jquery?
What is queue() in jquery? Use of queue() in jquery?
Explain all the ways to include jquery in a page?