Hey everyone, I've got this function that's working great but I'm encountering a small problem.
$(document).ready(function(){
$("input[type='submit']").attr("disabled", false);
$("form").submit(function(){
$("input[type='submit']").attr("disabled", true).val("Please wait.");
setTimeout(function(){
$("input[type='submit']").attr("disabled", false).val("Submit");
}, 3*1000);
return true;
})
})
The issue I'm facing is that when there are 2 forms on a page, the value of all submit buttons change. I only want the function to apply to the button that was clicked, not all submit buttons.
I'm aware that I need to make some modifications in the function, but I'm having trouble doing that...