Snippets → jQuery Code Snippets → Disable / Re-enable Inputs Disable / Re-enable Inputs Chris Coyier on Nov 29, 2009 Disable: $("#submit-button").attr("disabled", true); Re-enable: $("#submit-button").removeAttr("disabled");
You can also use the
.prop()
function.A simple
$("#submit-button").prop('disabled', true);
$("#submit-button").prop('disabled', false);
will also do then.
.prop does not work in IE
Yes Its Not Workin On Internate Explorer
Which version? I am using it in this tutorial jquery disable button and it is working fine in IE9, do you mean earlier versions, I didn’t know this.
Thanks!
yeahh…
Not working in IE 11 also
Use
$(“#submit-button”).prop(“disabled”, true);
$(“#submit-button”).is(‘disabled’, true);
$(“#submit-button”).is(‘disabled’, false);