I have a nested list with checkboxes.
With the first checkbox i want to toggle all the checkboxes in that list.
I know how to toggle them with jQUery but i don’t know how to select them.
Thats the problem, the selecting part.
<ul>
<li>
<p> lorem ipsum </p>
<ul class="list">
<li><input type="checkbox"></li>
<li><input type="checkbox"></li>
<li><input type="checkbox"></li>
</ul>
</li>
<li>
<p> lorem ipsum </p>
<ul class="list">
<li><input type="checkbox"></li>
<li><input type="checkbox"></li>
<li><input type="checkbox"></li>
</ul>
</li>
</ul>
Assuming I have read your request correctly;
jQuery
.siblings()Exampe: http://jsfiddle.net/52DBv/