Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use jquery or javascript to remove a row at index? [duplicate]

Possible Duplicate:
What is the best way to remove a table row with jQuery?

If I have table with 3 rows using tr tag, how do I remove the first row (index 0) with either jquery or some other javascript?

like image 731
Varia Avatar asked Apr 28 '11 16:04

Varia


1 Answers

try

$("tr").eq(0).remove();

However, like @Gregg said, take a look at official docs

like image 82
Cristian Avatar answered Oct 05 '22 10:10

Cristian