sort asc on class
sort asc on class
tuurtnt@hotmail.com
Posts: 7Questions: 0Answers: 0
Is it possible to add a classname (defaultsort) to a TH, so that datatables always sorts on this column?
This discussion has been closed.
Replies
[code]
$('#example').dataTable({
"aaSorting": [[$('#example thead tr th').index($('th.defaultsort')[0]), 'asc']]
});
[/code]
Allan
this doesn't work...
[code]
"aoColumnDefs": [
{
"aaSorting": [[$('#DTsortable thead tr th').index($('th.sortdefault')[0]), 'asc']],
"aTargets": [ 'sortdefault' ]
}
]
[/code]
Allan