just a guy just a guy - 10 months ago 68
jQuery Question

How can I enable a fieldset?

Normal disclaimer that I'm a terrible web developer.

I was lead to believe that, with a

<fieldset disabled id="homeFieldset">...</fieldset>
, I could enable its controls with
$("homeFieldset").disabled = false
, but alas...nothing. Also, I'm testing this in Chrome, where it should work. Fiddle: https://jsfiddle.net/ggrxx4hm/1/

FWIW, debugging shows me that
is undefined. However, if I do
$("#homeFieldset")[0].disabled = false
, it works. Fiddle: https://jsfiddle.net/7edje5vk/

Edited selector in second paragraph.

Edit again: But why doesn't
.disabled = false


JS Fiddle

$("#homeFieldset").prop('disabled', false);