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
How to call a method inside code-behind using jquery?
Tell me what is the use of .size() method in jquery?
What is the use of .size() method in jquery?
What is the use of jQuery.data() method?
How can we apply css in even childs of parent node using jquery library?
What are the browser related issues for jQuery?
How can we apply css in odd childs of parent node using jquery library?
What does jQuery data() function do?
Explain which program is useful for testing jquery?
What are the features of jQuery, has been used in web applications?
Can we add more than one ‘document.ready’ function in a page?
Define cdn in jquery?
What is ajax and how it works?
What were the biggest challenges of getting the jQuery 1.7 release ?
What is jquery.holdready() function?