0

I have seen many tutorials on this site and others, including the tutorial from the tablesort website itself. However, every tutorial has resulted in an input box that does not sort my table. I am using the JQuery tablesorter plugin, and everything works fine, but only with the normal sorting. How can the I add a search bar that functions above the table and hides all rows that do not fit the search criteria. Currently, the Zebra widget is implemented and working properly.

4
  • can you share your attempt code in jsfiddle Jul 19, 2016 at 7:18
  • @MohammedFarooq Do you want my current code? Or the code I tried that did not work?
    – Zuve
    Jul 19, 2016 at 7:31
  • Code which u tried and not worked. Jul 19, 2016 at 7:47
  • @MohammedFarooq I can't get it right now, as I'm away from the computer I was using, but I'll add it when I get a chance
    – Zuve
    Jul 19, 2016 at 7:48

1 Answer 1

0

I found an easy way of doing the search, outside of the plugin.

<input type="search" class="light-table-filter" data-table="tablesorter" placeholder="Search">

Using that as the search bar and the JS in the link below, I easily incorporated a search bar.

Here it is: https://codepen.io/chriscoyier/pen/tIuBL

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.