Skip to content

Instantly share code, notes, and snippets.

@dcneiner
Created June 30, 2010 14:11
Show Gist options
  • Save dcneiner/458700 to your computer and use it in GitHub Desktop.
Save dcneiner/458700 to your computer and use it in GitHub Desktop.
// How I normally did it:
(function ($) {
var global = {
// ...
};
window.global = global;
}(jQuery));
// What I learned from @amWirick
var global = (function ($) {
return {
// ...
};
}(jQuery));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment