I have the following table:
<table id="test"> <tr id=1><td>bla</td></tr> <tr id=2><td>bla</td></tr> <tr id=3><td>bla</td></tr> <tr id=4><td>bla</td></tr> </table>
Now I want to remove row 3 from the table. How do I do that? Something like:
$("#test tr ??").remove();
Thanks!
The jQuery remove() method is used to remove a row from HTML table. jQuery remove() Method: This method removes the selected elements alongwith text and child nodes. This method also removes data and events of the selected elements. Parameters: It accepts single parameter selector which is optional.
Try
$('table#test tr#3').remove();
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