How in Jquery do I select the first blank input which is not a check box or a button. I have the following:
$(':input[value="",type!="button",type!="checkbox"]:visible:first').focus();
Thanks for any suggestions
Tiny bit shorter
$("input[value='']:not(:checkbox,:button):visible:first").focus();
$('#formid')
.find('input:blank:not(:checkbox,:button)')
.filter(":visible:enabled")
.first()
.focus();
(During my testing, input[value='']
worked only for pre-filled empty input fields; input:blank
didn't have that problem.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With