For some strange reason i am unable to remove the first <tr> with this code:
$('tbody tr#2 .is_KW').remove();
This is my html table code:
<tbody>
<tr id="2" class="is_KW">
<td class="KW" style="border-left: 1px solid white;border-right: 1px solid #F4F4F4;padding: 12px 14px;position: relative;text-align: left;">
<img src="img/world/af.png" alt="" title="af" style="vertical-align:middle;"> sweden
</td>
<td class="RR" style="border-left: 1px solid white;border-right: 1px solid #F4F4F4;padding: 12px 14px;position: relative;text-align: left;">
<strong>
1000+ </strong>
</td>
</tr>
</tbody>
Any ideas?
It should be
Your selector, with the additional space, was targeting an element with class
is_KWinside thetrelement.Note that when you have an ID, you should only use it :
except of course if the class is meant as a condition for the removal and might be not present.