Skip to content

Instantly share code, notes, and snippets.

@beau-gosse
Created January 7, 2016 18:52
Show Gist options
  • Save beau-gosse/4a6596a958d4d61a89d6 to your computer and use it in GitHub Desktop.
Save beau-gosse/4a6596a958d4d61a89d6 to your computer and use it in GitHub Desktop.
JQuery Immediately Invoked Function Expression -- Quick start template
<script>
// IIFE -> Within this function, $ will always refer to jQuery
(function($) {
/* Execute on DOM ready */
$(function() {
// # code goes here
});
/* Execute later */
// # code goes here
})(jQuery);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment