It's fairly straightforward. I want to set focus to the first enabled and not hidden control on the page.
For a textbox, I have
$("input[type='text']:visible:enabled:first").focus();
But I want to get "all" form input controls: textbox, checkbox, textarea, dropdown, radio in my selector to grab the first enabled and not hidden control. Any suggestions?
$(':input:enabled:visible:first').focus();
2.1m questions
2.1m answers
60 comments
57.0k users