Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Farhan Noor

    (@farhannoor)

    Hi Fenik88

    You can add initial sorting by adding instructions in the CLASS attribute of the HTML table in the format:
    {sortlist: [[columnIndex, sortDirection], … ]}
    where columnIndex is a zero-based index for your columns left-to-right and sortDirection is 0 for Ascending and 1 for Descending. A valid argument that sorts ascending first by column 1 and then column 2 looks like: {sortlist: [[0,0],[1,0]]}

    Best Regards.
    Farhan.

    Can you please provide and example on how to do this? Where exactly is the “CLASS attribute of the HTML table”

    I tried adding:
    {sortlist: [[3,0]]}

    to my CSS CLASS of the HTML table and it did nothing ??

    Plugin Author Farhan Noor

    (@farhannoor)

    Hi Vivianattv

    Do not add in CSS, Add directly into class attribute of table, just like this:

    <table id="myTable" class="tablesorter {sortlist: [[2,0]]}">

    Hope it will solve your problem.

    Regards
    Farhan.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘colonna Pre-sort’ is closed to new replies.