Search code examples
javascriptjqueryasp.net-mvc-4tablesorter

How to specify initial sorting order as descending using tablesorter function?


I have changed sortInitialOrder:"asc" to sortInitialOrder:"desc" in tablesorter jquery file ,but it doesn't work.When I click on the column headers, the first sort is still in ascending order.

How can I get sorting order descending on first click? how to initialize that?


Solution

  • Try

    $("table").tablesorter({ 
            // sort on the 1st column and 3rd column, order asc 
            sortList: [[0,0],[2,0]] 
        });