Skip to content

Instantly share code, notes, and snippets.

@ChezFre
Created February 13, 2014 19:32
Show Gist options
  • Save ChezFre/8982144 to your computer and use it in GitHub Desktop.
Save ChezFre/8982144 to your computer and use it in GitHub Desktop.
Main Javascript file, wrapped in JQuery closure
var main;
(function($) {
/*
* Main
*
* @return init - public constructor
*/
main = function() {
/*
* destroy — Undo all customization and unlink all eventlisteners created by main
*
*/
var destroy = function() {
}
/*
* _addEventListeners
*
*/
var _addEventListeners = function() {
}
/*
* init
*
*/
var init = function() {
_addEventListeners();
}
return {
init : init,
destroy : destroy
}
}();
$(main.init); // initialize main application on dom ready
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment