I want to target the first input[type="text"] element in a form and if the form does not contain such an element then target the first input[type="number"] element.
How can this be done?
This is what I've got so far:
$('input[type=text]:first, input[type=number]:first').focus();
Thanks for any help.
*:'s?*:form *:as well, becauseinputs will always be in forms*. The problem is that the second selector seems to override the first one.