Created
January 2, 2016 20:47
-
-
Save emad-elsaid/7f683d6c80b6034ca796 to your computer and use it in GitHub Desktop.
disable submit button and enable it after 3 seconds
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function(){ | |
$('button[type="submit"]').click(function(){ | |
var _this = $(this); | |
_this.attr('disabled', 'disabled'); | |
setTimeout(function(){ | |
_this.removeAttr('disabled'); | |
}, 3000); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment