How do I select just a table with class d with jquery selectors. For some reason this code won't work properly...
var dTableTags = $(".d table");
example table would be...
<table id="thetable" class="d">
<thead>
<tr><th>Column 1 header</th><th>Column 2 header</th></tr>
</thead>
<tbody>
<tr><td>Column 1 data</td><td>Column 2 data</td></tr>
</tbody>
</table>
Your selector is wrong; try $("table.d")
instead.
The jQuery documentation does not explain this directly, it defers to the W3C CSS selector documentation which is a lot more comprehensive.
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