You just need to add the identifier to your table and update the selector accordingly.
<table id="the-table">
Then change this line:
$('#the-table').append(tr);
If you want to apply this to several tables, but not to all, use a generic class instead of an identifier.
source
share