Question

I have a series of INPUT tags with this id structure.

id="menu_popSearch_chk1_I"
id="menu_popSearch_chk2_I"
id="menu_popSearch_chk3_I"

Etc. HOWEVER, so I do not want these

id="menu_popSearch_chk1_S"
id="menu_popSearch_chk2_S"
id="menu_popSearch_chk3_S"

Is there a 'wildcard' kind of feature where I can get the first set, but not the second set.

Was it helpful?

Solution

$('input[id$=_I]')

read here

EDIT: or maybe you could do

$('input[id^=menu_popSearch]').not('input[id$=_S]')

EDIT 2: okay as you keep refining the question I'll try to keep up

$('input[id^=menu_popSearch][id$=_I]')

read here now

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top