I am trying to select some elements on my page based on some conditions... and these all have some common parents as follow:
$("[id*=wizard_person]:not(.hidden) select.required, [id*=wizard_person]:not(.hidden) input.required:not(.tt-hint)").each ->
...
Here, I'm selecting both input.required:not(.tt-hint) and select.required that are present in [id*=wizard_person]:not(.hidden).
However, I'm writing [id*=wizard_person]:not(.hidden) twice, to handle both scenarios.
Is there a way I can DRY this up? if yes, How? thanks.
$("select.required,input.required:not(.tt-hint) , [id*=wizard_person]:not(.hidden)")[id*=wizard_person]:not(.hidden)? The OP is trying to target specificinputandselectdescendants