How to disable or enable a form element with jQuery?
by kalai[ Edit ] 2010-02-01 12:13:55
You need 2 jQuery functions: attr and removeAttr.
To disable a form element such as a text input or a button (with a made-up id: #elm):
$("#elm").attr("disabled", "disabled");
To enable a disabled form element:
$("#elm").removeAttr("disabled");