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?
It sounds like you’re looking for
<input type="hidden">elements. If so then look specifically for thetype="hidden"attribute