top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is jQuery.noConflict?

+2 votes
What is jQuery.noConflict?
posted Jul 3, 2015 by Manikandan J

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

The noConflict() method releases the hold on the $ shortcut identifier, so that other scripts can use it.
You can of course still use jQuery, simply by writing the full name instead of the shortcut:

        jQuery("p").text("jQuery is still working!");

You can also create your own shortcut very easily. The noConflict() method returns a reference to jQuery, that you can save in a variable, for later use. Here is an example:

var jq = $.noConflict();
        jq("p").text("jQuery is still working!");
answer Jul 4, 2015 by Amit Kumar Pandey