Fonction anonyme à invocation automatique attribuée à la yournamespacechoice
variable globale. Sert à garder toutes les fonctions et variables privées pour cette fonction. Pour exposer une fonction ou une variable, nous devons la renvoyer explicitement en bas de la fonction. Remappe jQuery en $.
var yournamespacechoice = (function ($) ( var publicfunction; function privatefunction() ( // function only available within parent function ) publicfunction = function publicfunction() ( // public function available outside of this funtion ); // Expose any functions that we need to access outside of this scope. Use yournamespacechoice.functionName() to call them. return ( publicfunction: publicfunction ); )(window.$));