Hey guys, I'm trying to make a small addition to a web app I use. Right now I am trying to check all of the checkboxes on the page which have class .checkBox
(In case it is needed to differentiate/select). The checkboxes are descendants of divs of class .someClass
, it's just that there are many divs which have that class. I want to check the boxes which are descendants of divs whose class is only .someClass
.
In other words:
<!-- Check this box -->
<div class="someClass"> [...] <input type="checkbox" class="checkBox" /></div>
<!-- But not this one -->
<div class="someClass otherClasses lolWut"> [...] <input type="checkbox" class="checkBox" /></div>
Remember, the checkboxes aren't direct children, but descendants.
Thanks, I would appreciate any help :)