Created
October 14, 2011 18:21
-
-
Save spacecowb0y/1287882 to your computer and use it in GitHub Desktop.
JavaScript Template for Winners
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
// @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