I'm using DataTables to display my data. I'm using fnAddData to add new data to row. This function inserts new row at the last of table. What I want is when I'm doing add new row, it become first row on the table. How can I do this?
This is my code:
$('#example').dataTable().fnAddData( [
caption,
grade,
"<span class='edit'>Edit</span><span class='delete'>Delete</span>",
id,
kind,
oTable.fnGetData().length ]
);