I have a <table id="myTable">
with a number of child elements:
<tr><td>
<span class="mySpan" />
</td></tr>
<tr><td>
<span class="mySpan" />
</td></tr>
<tr><td>
<span class="mySpan" />
</td></tr>
How to select all this spans using jQuery?
Note that you COULD do any of the following:
$("#myTable").find(".mySpan");
$("#myTable .mySpan");
$("#myTable tr td .mySpan");
$("#myTable").find("tr").find("td").children(".mySpan");
$(".mySpan");
$("#myTable > tr > td > .mySpan");
$(".mySpan ,#myTable");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With