Skip to content

Instantly share code, notes, and snippets.

@pglewis
Created November 3, 2014 23:36
Show Gist options
  • Save pglewis/de74fa616843ff520a52 to your computer and use it in GitHub Desktop.
Save pglewis/de74fa616843ff520a52 to your computer and use it in GitHub Desktop.
jQuery( function () {
My_Object.init( params );
} );
(function ( $, app ) {
/**
* A variable
*/
app.var = 42;
/**
* Bootstrap
*/
app.init = function( params ) {
// Do stuff
};
/**
* Another function
*/
app.another_function = function( params ) {
//do more stuff
};
/**
* Events object
*/
app.events = {
clickHandler : function() {
//something
},
formSubmitHandler : function() {
//something
}
}
})( jQuery, window.My_Object || ( window.My_Object = {} ) );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment