Top Ad unit 728 × 90

jQuery delete all table rows except first header row


Whenever you want to show row values dynamically into the table at that time table row should be refreshed. And for that purpose you can try this code.

Simply I have used the following code and it works great.

$("#asenTableId tr:gt(0)").remove();

Here, you can see #asenTableId is the identity of the table and tr:gt(0) means table row greater than zero means it leaves the first row of the table.
jQuery delete all table rows except first header row Reviewed by Ashok Sen on 13:17:00 Rating: 5
All Rights Reserved by ASENwebmedia © 2014 - 2015
Powered By Blogger, Developed by Asenwebmedia

Contact Form

Name

Email *

Message *

Powered by Blogger.