This might be a newbie question, but I am having trouble with it.
I have 4 checkboxes vertical
<input type="checkbox"><label>box 1</label><br /> <input
type="checkbox"><label>box 1 and 2</label><br /> <input
type="checkbox"><label>box 1 and 2 and 3</label><br /> <input
type="checkbox"><label>box 1 and 2 and 3 and 4</label><br />
When I click one, I want to check the boxes of all the ones previous to it
(including it). And uncheck all the boxes after it.
How would I structure the statement in jQuery to select? I am trying to
avoid the FOR loop.
This gives me the last one.
var lastOne = $("#myForm [EMAIL PROTECTED]:checked:last");
Not sure how to use this. I tried prev() but that didnt seem to work.
Thanks for the help,
Glen
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/