Created
February 20, 2014 14:59
-
-
Save davidbrooks/9115564 to your computer and use it in GitHub Desktop.
My starting point for a standard JS file. Module pattern + jQuery.
This file contains 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
var interaction = (function($, window, undefined) { | |
// These are some global variables. | |
var example_a = ''; | |
// This is a standard document ready from jQuery. It allows the script to self-start. | |
$(document).ready(function(){ | |
interaction.init(); | |
}); | |
return { | |
init: function(){ | |
// These things happen when the page is loaded | |
interaction.clicks(); | |
}, | |
clicks: function(){ | |
// Watch some clicks here | |
} | |
}; | |
})(jQuery, this); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment