I’m doing form validation using jquery validate plugin. It works great, however if DOM is not fully loaded and you click submit button then the document ignores validation and goes to a page specified in form “action” attribute. Is it possible to prevent submit button from submitting until DOM is loaded?
I’m doing form validation using jquery validate plugin. It works great, however if DOM
Share
If you generate your submit button like so:
Then you can put this in your
$(document).ready(right after the validation plugin has been initialised:Demo: http://jsfiddle.net/nZVrs/