I have that in my html
<input type="checkbox" id="1234">
<input type="checkbox" id="2345">
<input type="checkbox" id="3456">
<input type="checkbox" id="4567">
<input type="checkbox" id="5678">
And an list of id 1234 2345 3456 or #1234 #2345 #3456
I want to get all the element of the list whose id is in the list of id
I try $(":checkbox").attr('id', items_id); and var items_cb = $(":checkbox[id='items_id']"); where items_id is the list of item, but it doesn’t work.
Just try to put all id’s in selector separated by comma:
Code: http://jsfiddle.net/3df6W/
P.S. ID’s shouldn’t start with digits.