get the app get the app       get the app       get the app
What is jQuery.noConflict?


  • : 313
  • : 3
    Previous Next

    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().

    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.

    var $j = jQuery.noConflict();
    // Use jQuery via jQuery(')
    $j(document).ready(function(){
    $j("div").hide();
    });

    you can suggest other answer in comment box


  • Exam: jQuery Interview





    Recommended Learning for you

    Close(X)
    Subscribe here for free mock test on IAS PCS SSC and other competitive exam. Signup here to get SSC CGL Solution and main exam study material