Reputation: 17615
I'm now doing it this way:
$form.find(':input')
But how do exclude those disabled elements?
Upvotes: 3
Views: 1006
Reputation: 806
I thought it might be useful to post a simple variation here, taking a cue from the code snippet above. I wanted to find if a particular element was enabled:
var firstNameEnabled = $('.firstName:input:enabled').length > 0;
Now firstNameEnabled
will be true false, depending on the state the field has
Upvotes: 0
Reputation: 117
You may want to use
$(':input:enabled',$('#FormID'));
or
$('#FormID :input:enabled')
Upvotes: 0