Created
August 14, 2014 20:25
-
-
Save avifoxi/3489f1e95d93fd956d4b to your computer and use it in GitHub Desktop.
intercepting form submission - then get the data
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
// shorthand for $(document).ready(); | |
$(function(){ | |
//Your code... | |
var f = $('form'); | |
$(f).submit( function(event){ | |
event.preventDefault(); | |
var children = event.currentTarget.childNodes; | |
var shitwecareabout = [] | |
for (var i = 0; i < children.length; i++) { | |
if (children[i].tagName === 'INPUT'){ | |
shitwecareabout.push(children[i]); | |
} | |
} | |
shitwecareabout[0].value; | |
}) | |
}); | |
function validEmail() { | |
} | |
function validPword() { | |
} | |
// if errors print to screen | |
// else | |
// submit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment