The $ shortcut is globally claimed by jQuery when it loads, but other libraries — Prototype, MooTools, Lodash — also use $. If you need to use two such libraries on the same page, jQuery's $.noConflict() method releases the $ alias so other libraries can reclaim it.
How It Works
After calling $.noConflict(), $ reverts to whatever it was before jQuery loaded. jQuery itself is still accessible via the jQuery global. You can also store the jQuery object in your own variable — convention uses $ inside an IIFE scope to keep the alias locally.
Self-Executing Function Pattern
The standard pattern for jQuery plugins and encapsulated modules passes jQuery into an IIFE as the parameter named $. This gives you the familiar $ shorthand inside the function while staying completely safe outside it, regardless of any global conflicts.
$.noConflict()— release global$, keepjQueryvar jq = $.noConflict()— store jQuery in a custom variable- IIFE pattern:
(function($){ ... })(jQuery) - Passing
truealso releases thejQueryglobal