javascript - JS /JQuery Form Submit Delay? -


i've implemented 'locksubmit' plugin http://blog.leenix.co.uk/2009/09/jquery-plugin-locksubmit-stop-submit.html changes display state of button disabled. want form delayed few seconds before posting form url.

what have add in or modify delay form "post" once user has clicked submit button?

thanks!

cancel default form submit behaviour, , start timeout @ same time:

$('form').submit(function (e) {     var form = this;     e.preventdefault();     settimeout(function () {         form.submit();     }, 1000); // in milliseconds }); 

this should compatible locksubmit plugin.

see demo here: http://jsfiddle.net/7gjx6/


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -