I want to run an Asp.net button click event (After clicking it) then disable it for 5 seconds and enable it again. I use this java script code but the click event code does not
check this out. https://jsfiddle.net/9ds9mL1v/5/
$("#Button1").click(function(){ var button =$(this); var oldValue = $(this).value; button.attr('disabled', true); button.value = 'Wait 5 sec'; setTimeout(function () { button.value = oldValue; button.removeAttr('disabled'); }, 5000) });