jQuery: Delete all table rows except first one using jQuery - w3resource

PHOTO EMBED

Thu Jul 21 2022 13:12:09 GMT+0000 (UTC)

Saved by @Harsh_S #javascript #jquery

$(document).ready(function(){ 
  $('#button1').click(function(){ 
    $("#myTable").find("tr:gt(0)").remove();
  });
});
content_copyCOPY

https://www.w3resource.com/jquery-exercises/part1/jquery-practical-exercise-33.php