Docs: Add filter event function parameter examples

This commit is contained in:
Rob Garrison 2016-07-27 13:39:42 -05:00
parent 012f9419d3
commit 04287900d3
No known key found for this signature in database
GPG Key ID: 0A42D160D71978E1

View File

@ -5839,7 +5839,7 @@ $.tablesorter.storage( $('#myTable'), 'tablesorter-filters', '' );</pre>
$('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', '' );</pre>
<td>Event triggered when the filter widget has started processing the search (v2.4).
<div class="collapsible"><br>
You can use this event to do something like add a class to the filter row. Use it as follows:<pre class="prettyprint lang-js">$(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');
});
});</pre></div>