I have the following code
<tr id="myid">
<td>
<div>
...
<a href="" class="myclass"></a>
<a href="" class="myclass"></a>
<a href="" class="myclass"></a>
<a href="" class="myclass"></a>
<a href="" class="myclass"></a>
...
</div>
</td>
</tr>
<tr id="anotherid">
<td>
<div>
...
<a href="" class="myclass"></a>
<a href="" class="myclass"></a>
<a href="" class="myclass"></a>
<a href="" class="myclass"></a>
<a href="" class="myclass"></a>
...
</div>
</td>
</tr>
and I’m trying to select A tags inside tag TR with ID “myid” attribute however the following code doesn’t works:
$('#myid.myclass')
How can I select the A tags, using the TR ID?
Use this:
$('#myid .myclass')– There should be a space between#myidand.myclass