Fred J. Fred J. - 5 months ago 39
Javascript Question

jQuery selector of optional types

This jQuery selector tries to match

elements which have any of the following types
[text | number | email | tel]

It is failing to match the elements. how can it be done? Thx



You need to have a comma separated selector:

$('input[type="text"], input[type="number"], input[type="email"], input[type="tel"]')

Another option is: