How to remove “disabled” attribute using jQuery?

I have to disable inputs at first and then on click of a link to enable them. This is what I have tried so far, but it doesn’t work. HTML: <input type=”text” disabled=”disabled” class=”inputDisabled” value=””> jQuery: $(“#edit”).click(function(event){ event.preventDefault(); $(‘.inputDisabled’).removeAttr(“disabled”) }); This shows me true and then false but nothing changes for the inputs: $(“#edit”).click(function(event){ alert(”); … Read more

Disable/enable an input with jQuery?

$input.disabled = true; or $input.disabled = “disabled”; Which is the standard way? And, conversely, how do you enable a disabled input? 1 19 jQuery 1.6+ To change the disabled property you should use the .prop() function. $(“input”).prop(‘disabled’, true); $(“input”).prop(‘disabled’, false); jQuery 1.5 and below The .prop() function doesn’t exist, but .attr() does similar: Set the … Read more