I have a table:
<table id="my-table" border="1">
<tr>
<td>Apples</td>
</tr>
</table>
And I append a row to it as such:
$('#my-table').append('<tr><td>Oranges</td></tr>');
This is a very basic example and a simple append. In my current project the table is a lot larger and making changes are more complicated.
Is there another way to approach this? I mean, if I make a change to my table, I need to go back to my JS file and make a change to the append too. Seems a little redundant. This might be a ridiculous question but I'm curious to know if there's a simplified approach.