jQuery Tutorial
jQuery Introduction jQuery Getting Started jQuery Syntax jQuery Selectors jQuery Events
jQuery Effects
jQuery Hide/Show jQuery Fade jQuery Slide jQuery Animation jQuery stop() jQuery Callback jQuery Chaining
jQuery Manipulation
jQuery Get/Set jQuery Add jQuery Remove jQuery CSS Classes jQuery css() jQuery Dimensions
jQuery Traversing
jQuery Traversing jQuery Ancestors jQuery Descendants jQuery Siblings jQuery Filtering
jQuery AJAX
jQuery AJAX Intro jQuery Load jQuery Get/Post jQuery AJAX Events
jQuery Misc
jQuery noConflict() jQuery Filters
jQuery References
jQuery Reference jQuery Selectors jQuery Events jQuery Effects jQuery HTML/CSS jQuery Traversing jQuery AJAX jQuery Miscellaneous jQuery Properties

jQuery - No Conflict Mode

As you already know, jQuery uses the dollar sign ($) as a shortcut or alias for jQuery.

Many JavaScript libraries use $ as a function or variable name, just as jQuery does.

If two different libraries are using the same shortcut, one of them might stop working.

Fortunately, jQuery provides a special $.noConflict() method to deal with such situation.

jQuery $.noConflict() Method

The jQuery $.noConflict() method releases jQuery's control of the $ variable, so that other scripts can use it.

You can of course still use jQuery, simply by writing the full name instead of the shortcut:

Run code

This method can also be used to specify a new custom name for the jQuery variable.

The following example creates a different alias instead of jQuery to use in the rest of the script:

Run code

jQuery Misc Reference

For a complete Misc methods reference, visit our jQuery Misc Reference.