Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is jQuery.noConflict?

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


Please Help Members By Posting Answers For Below Questions

How to work with jQuery parent(), children() and siblings()?

896


How to get the value of selected option in jquery?

815


What is the use of css() method in jquery?

846


How can we apply css in last child of parent using jquery library?

848


How can jquery be used in conjunction with another javascript library that also uses $ for naming?

801


What are the differences between size and length in jquery?

827


How we can select multiple elements in jquery?

832


Mention the differences between javascript and jquery.

784


What is the difference between text() and html() in jquery?

801


How we can modify the css class in jquery?

779


What are the difference between empty(), remove() and detach() functions in jquery?

879


List browser related issues for jquery?

770


What are the slow selectors in jquery? : jquery mobile

804


What is the need for jquery? : jQuery Mobile

881


In what scenarios jQuery can be used?

898