JSFiddle - React, Tailwind, and code Playground

HTML

<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/dot-luv/jquery-ui.css">
<table>
  <tr id="tr1">
    <td>
      hello world!
    </td>
  </tr>
  <tr id="tr2">
    <td>
      hello world again!
    </td>
  </tr>
</table>

CSS

table { border: solid 1px #ddd; }

JavaScript

$("#tr1").nextAll().remove();
$("table").after("<table><tr><td>another table</td></tr></table><table>");