Skip to content

Instantly share code, notes, and snippets.

@spacecowb0y
Created October 14, 2011 18:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spacecowb0y/1287882 to your computer and use it in GitHub Desktop.
Save spacecowb0y/1287882 to your computer and use it in GitHub Desktop.
JavaScript Template for Winners
// @author: Franco Laiuppa
try {
var home = {
log: function(data) {
// return false; // if you dont want messages to be logged
try {
if (typeof data != 'string') {
console.warn('Debug of variable ===>');
console.debug(data);
}
else { console.debug(data); }
}
catch (e) {}
}
form_submit_handler: function(evt) {
var that = $(this);
home.log(that);
evt.preventDefault();
},
startup: function(){
// bind event handlers
$('form').submit(home.form_submit_handler);
}
};
}
catch (e) { console.debug(e); }
$(document).ready(home.startup);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment