I am debugging someone else\'s JavaScript code and a majority of the code is wrapped like this:
(function ($) { //majority of code here... })(jQuery); >
This is useful when you want / need to use jQuery.noConflict(), and the global name $ isn't an alias for jQuery. The code you posted lets you use the shorter $ to mean jQuery inside the anonymous function only, without $ needing to be a global.
$
jQuery