Tuesday 12 February 2013

Hide a button for a specific time in jquery



Code:
  
var enableSubmit = function(a) {
    $(a).removeAttr("disabled");
}

$("#submit").click(function() {
    var button = this;
    $(this).attr("disabled", true);
    setTimeout(function() { enableSubmit(button) }, 3000);
    
});
Note:Dont forget to include the jquery.js file to run this demo.

No comments:

Post a Comment