I am trying to insert a row dynamically in my table, but I have no luck to achieve this.
In my ajax success this is how I insert the table row
$('#mytable').find('tbody').append(data);
HTML:
<table class="display" id="mytable" width="100%" cellspacing="0">
<thead>
<tr>
<th>#</th>
<th>FIRST NAME</th>
<th>LAST NAME</th>
<th>ADDRESS</th>
<th>AGE</th>
</tr>
</thead>
<tbody>
// I want to insert here.
</tbody>
</table>
This is the data that is being returned.
<tr class="myclass">
<td style="text-align: center;">1</td>
<td>Jack</td>
<td>Miller</td>
<td>California</td>
<td>24</td>
</tr>
<tr class="myclass">
<td style="text-align: center;">2</td>
<td>Miguel</td>
<td>Park</td>
<td>London</td>
<td>64</td>
</tr>
Thank you in advance.