SyntaxFix
Write A Post
Hire A Developer
Questions
Use the new "on" event syntax.
$(document).ready(function() { $('form').on('submit', function(e){ // validation code here if(!valid) { e.preventDefault(); } }); });
Cite: https://api.jquery.com/on/