Created
June 15, 2011 22:17
-
-
Save gdiggs/1028275 to your computer and use it in GitHub Desktop.
top down shit
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
$('form').live('submit', submitForm(e, $(this)) ); | |
var submitForm = function(e, $form) { | |
e.preventDefault(); | |
// make sure we want to do shit | |
doShit(); | |
// stuff we do after doing shit | |
}; | |
var doShit = function() { | |
$.ajax({ | |
// some data | |
success: shitSuccess() | |
}); | |
}; | |
var shitSuccess = function() { | |
// fuck yeah | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
this is some good shit