If I set a button's disabled
attribute to be true
, and I then want to enable it after a certain period of time using jQuery, why can I not then just set the disabled
attribute to be false
with the jQuery?
HTML:
<form>
<input id="myButton" type="submit" disabled="true" value="Submit"/>
</form>
jQuery:
setTimeout(EnableSubmit, 3000);
function EnableSubmit()
{
$("#myButton").attr("disabled", "false");
}
JSFiddle: http://jsfiddle.net/TV7t4/