I want to know
How JQuery assign function name to $ ?
This is done at line
9384 of the uncompressed library (see http://code.jquery.com/jquery-1.7.2.js)
// Expose jQuery to the global object window.jQuery = window.$ = jQuery;
jQuery on the right side of this assignment is the function-scoped reference (starting at line
22): of course you could create your favourite shortcut (e.g.
_) doing something like
window._ = window.jQuery
after you've loaded the library, so you can use
_ instead of
If you asked this because you have loaded some other libraries and you have a conflict with the
$ reference, just take a look at