From 04287900d3206d82acc8b43c754ded4c63b48531 Mon Sep 17 00:00:00 2001 From: Rob Garrison Date: Wed, 27 Jul 2016 13:39:42 -0500 Subject: [PATCH] Docs: Add filter event function parameter examples --- docs/index.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/index.html b/docs/index.html index efed4367..c8b4d226 100644 --- a/docs/index.html +++ b/docs/index.html @@ -5839,7 +5839,7 @@ $.tablesorter.storage( $('#myTable'), 'tablesorter-filters', '' ); $('table') // bind to filter initialized event BEFORE initializing tablesorter* - .bind('filterInit', function(){ + .bind('filterInit', function(event, config){ $(this).find('tr.tablesorter-filter-row').addClass('fred'); }) @@ -5858,7 +5858,8 @@ $.tablesorter.storage( $('#myTable'), 'tablesorter-filters', '' ); Event triggered when the filter widget has started processing the search (v2.4).

You can use this event to do something like add a class to the filter row. Use it as follows:
$(function(){
-  $('table').bind('filterStart', function(){
+  $('table').bind('filterStart', function(event, filters) {
+    // filters contains an array of the current filters
     $(this).find('tr.tablesorter-filter-row').addClass('filtering');
   });
 });