Search code examples
jquerytablesorter

Using Tablesorter, how to load table with filter defined in a URL


With Tablesorter, is it possible to send an URL that can apply a desired filter.

Specifically, in the table there is a location column with a text searchable filter. I would like users to be able to enter a URL that contains the specific location they need to filter.

So the URL might look something like: http://www.webpage.com?location=SFO

Is this possible somehow?


Solution

  • Was able to accomplish this by using:

    $('table').find('input.tablesorter-filter').eq(0).val('name'); $('table').trigger('search', false);

    Then had HTML insert the "name"