Created
February 23, 2013 23:31
-
-
Save lucassmagal/5021843 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(window, $, undefined) { | |
'use strict'; | |
// code goes here | |
})(window, jQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
se o objeto window for cagado antes da chamada da função, você vai continuar recebendo uma versão cagada. idem para undefined.
o jQuery é definido como $ porque o prototype ou alguma outra biblioteca também usa o $ para se referir a si mesmo, então faz todo o sentido.
a documentação do jQuery usa apenas o jQuery/$