Reputation: 11545
I'm selecting a element with a certain name
$('[name="lol"]']
but there can be two elements with the same name, one of the is a hidden input field.
How can I ignore hidden input fields from the selector above?
$('[name="lol"]:not(:hidden)']
kind of works, but fails if the non-hidden input field is not visible on the screen... How can I specifically ignore only hidden-type inputs, not non-visible elements?
Upvotes: 1
Views: 95
Reputation: 754545
It sounds like you're looking for <input type="hidden">
elements. If so then look specifically for the type="hidden"
attribute
$('[name="lol"][type!="hidden"]')
Upvotes: 3