<div id="customerServices">
<div id="pnlCustomerServices_Container">
<!-- and many others divs...... -->
<div id="s1_Container">
<div id="ext-gen32">
<!-- and many others divs........ -->
<input type="checkbox" id="s1"
name="s1" class=" x-form-checkbox and_many_classes..... parent" value="s1">
<label for="s1" class="x-form-cb-label font-bold"
id="ext-gen33">Label1Text</label>
<!-- and many others divs........ --->
</div>
</div>
<div id="s2_Container">
<div id="ext-gen33">
<!-- and many others divs........ -->
<input type="checkbox" id="s2"
name="s2" class=" x-form-checkbox and_many_classes..... parent" value="s2">
<label for="s2" class="x-form-cb-label font-bold"
id="ext-gen34">Label1Text</label>
<!-- and many others divs........ --->
</div>
</div>
</div>
</div>
I want to find all input checkBox (in this case input checkBox id="s1" and input checkBox id="s2") that have the attribute class contains "parent" and nested inside div id="customerServices".
But the difficult is it's unknown how many divs are between customerServices and input class = "parent" and how many values has input's attribute class.
update: some time ago I was using the following code. But it doen't work for the current task.
$('#customerServices input:checkbox[class="parent"]');
update2:
And one more thing. How can I find the checkBox which doesn't have attribute class=parent
$('#customerServices input:checkbox[class^="parent"]')
$("input:checkbox.parent")?