I am trying to get the first input field in a form that is not disabled or hidden. I need to be able to exclude switches, select specific identifiers.
The following code works fine, EXCEPT, when the selection appears before the text or password I want:
$("form :input:visible:enabled:first:not('select')");
If I exclude: not ('select'), the selection is returned as the first input field (correct, since: input returns almost all form elements). However, when I include: not ('select'), nothing happens. Any ideas?
The second part to this question is - I assume this is normal for the: nots chain, so I could be something like:
$("form :input:visible:enabled:first:not('select'):not(#specific_id):not(type[radio])");
source share