mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Docs: Add filter event function parameter examples
This commit is contained in:
parent
012f9419d3
commit
04287900d3
@ -5839,7 +5839,7 @@ $.tablesorter.storage( $('#myTable'), 'tablesorter-filters', '' );</pre>
|
|||||||
$('table')
|
$('table')
|
||||||
|
|
||||||
// bind to filter initialized event BEFORE initializing tablesorter*
|
// bind to filter initialized event BEFORE initializing tablesorter*
|
||||||
.bind('filterInit', function(){
|
.bind('filterInit', function(event, config){
|
||||||
$(this).find('tr.tablesorter-filter-row').addClass('fred');
|
$(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).
|
<td>Event triggered when the filter widget has started processing the search (v2.4).
|
||||||
<div class="collapsible"><br>
|
<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(){
|
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');
|
$(this).find('tr.tablesorter-filter-row').addClass('filtering');
|
||||||
});
|
});
|
||||||
});</pre></div>
|
});</pre></div>
|
||||||
|
Loading…
Reference in New Issue
Block a user