I have 2 s on my page, but one of them should have all of it elements disabled depending on some user\'s choice.
The fieldsets contain text
In addition to what others posted:
Use .prop()
instead of .attr()
:
$('#myfieldset').prop('disabled',true)
It is more correct with regard to the DOM.
And it does not seem to work well with validation. Both firefox and chrome won't let me submit the form With unfilled 'required' inputs in the disabled fieldset, but don't give any instructions on how to complete the form either.