I created a Datatable, when clicking on a row, the row will be highlighted.
$("#example tbody").click(function(event) {
$(eTable.fnSettings().aoData).each(function (){
$(this.nTr).removeClass('row_selected');
});
$(event.target.parentNode).addClass('row_selected');
});
The data in the table will be refreshed automatically
function refreshTable(table){
eTable.fnReloadAjax(null, null, true);
}
function tableRefresher() {
refreshTable(eTable);
tid = setTimeout(tableRefresher, 1000); // repeat myself
}
After the table is refreshed, the selected row is not highlighted anymore.
Any ideas how to keep the selection intact after refreshing?
Thanks!