How does the jQuery noConflict function work?

Hey, I just looked at the docs for the noConflict function, and it says nothing about how this works (obviously). I was just wondering if anyone knew.

Does he fear $ ? ( delete window.$ ?)

Any suggestions would be highly appreciated.

+8
javascript jquery
source share
2 answers

You can check the source code :

 // Map over the $ in case of overwrite _$ = window.$ //.... noConflict: function( deep ) { window.$ = _$; if ( deep ) { window.jQuery = _jQuery; } return jQuery; } 
+10
source share

Returns $ to what it was before loading jQuery.

+9
source share

All Articles