What is jQuery.noConflict?
Answer / 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 |
Name 3 available jquery plugins that bootstrap has in their query plugin library.
Can we include multiple version of jquery? : jquery mobile
Explain each() function in jquery?
How to get attributes of an element using jQuery?
Why is the block display style used for animations?
What is parseint() and why it is used?
What are the basic selectors in jQuery?
What are the different types of selectors in jquery?
Explain .siblings() method in jquery?
Explain .live()? : jquery mobile
How to delete cookies in jquery?
How to get the style property of an element using ?