javascript - hide/display filter for tablesorter -


i d able hide/display filters while using tablesorter.

using table sorter went fine when added button execute :

function display_hide_filter() {      var filters = document.getelementsbyclassname('tablesorter-filter-row');       (var = 0; < filters.length; i++) {         var filter = filters[i];         if (filter.style.display == 'none') {             filter.style.display='inline';         } else {             filter.style.display='none';         }     } } 

i weird answer. hiding filter fine re displaying turn having filter cells under first header cell.

since got poor english , css/js skills, hope didnt miss in documentation tried trough thousant times no success.

thanks help

there filter_hidefilters option minimizes filter row until user hovers on it. accessible friendly in user can use tab key gain access filter inputs (demo).

if want hide/show filter row, basic code work (demo):

html

<button type="button">toggle filter row</button> 

script

$(function () {     $('table').tablesorter({         theme: 'blue',         widthfixed: true,         widgets: ['zebra', 'filter']     });      $('button').click(function(){         $('.tablesorter-filter-row').toggle();     }); }); 

Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -