Skip to content

sorton example page has incorrect examples #1641

@studgeek

Description

@studgeek

The sorton documentation on at https://mottie.github.io/tablesorter/docs/index.html properly describes how to call trigger sorton:
$( 'table' ).trigger( 'sorton', [ [[0,0],[2,0]] ] );

However, the examples at https://mottie.github.io/tablesorter/docs/example-trigger-sort.html are missing a wrapping set of square brackets. So it shows examples like the following, which silently fails (even with "debug filter" on).
$("#table1").trigger("sorton", [ [] ]);

Also, the example page does not mention the new direct method added in 2.23.

Perhaps there was a change in 2.23 to add the callback and the example page was not updated?

I'll add, sorton with the old style (as shown in current example page) should really throw an error of some sort (at least when debug: true) since older code may try to use that approach.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions