[I am quite new to jQuery so don't blame me if I get something wrong]
I have been browsing questions here on SO about: "Disable submit button after click". OK there are loads of these stuff around, but I couldn't find out how to disable it for a limited time. e.g. 20 secs.
Maybe I am the idiot but how?
[I've only got a simple html form]
var enableSubmit = function(ele) {
$(ele).removeAttr("disabled");
}
$("#submit").click(function() {
var that = this;
$(this).attr("disabled", true);
setTimeout(function() { enableSubmit(that) }, 1000);
});