What a heck is a (function ($){ ... })(jQuery)

Recently I wrote two articles on how to extend jQuery using its plug in system and a shorthand for that. If you look into them closely they are actually the same thing. The only difference being that the code in first one is wrapped in this anonymous JavaScript function: (function ($) {
// code goes here
})(jQuery)

Little research shows that this allows the use of $ within this function

Comments

Popular posts from this blog

Types and forms of imitation gemstone and manufactured

Genuine Windows 7 Ultimate: The GENUINE Windows 7 activator for x32 and x6480

7 Tips before you buy detectors for gold and treasures and minerals