You can set the default sort direction of your target column to 'desc' by using asSort
as documented here. This would sort your table in descending order on the first click. You would still to set the class of th:first
to sorting_asc
on init.
// Using aoColumns
$(document).ready( function() {
$('#example').dataTable( {
"aaSorting": [],
"aoColumns": [
{ "asSorting": [ "desc", "asc" ] }, // assumes you are targeting column 1
...// other columns
],
...// other configuration
} );
} );