function filter( input, cache, table ) {
        var val = $.trim( input.value );
        $(input).removeClass( "invalidFilter" );
        // dont do anything if unchanged
        if( $.data( input, "prevValue" ) && ( val === $.data( input, "prevValue" ))) return false;
        // dont do anything if invalid for filter
        var filter = $.data( input, "filter" );
        if( ! getFilterById( filter ).valid( val ) && ( val != '' )) {
          $(input).addClass( "invalidFilter" );
          return false;
          }
        // trigger filter start
        $(table).trigger( "filterStart" );
        // get column index
        var index = input.parentNode.column;
        // case sensitive?
        var caseSensitive = $.data( input, "caseSensitive" );
        // store to avoid reevaluation
        var numRows = cache.normalized[0].length; 
        for( i = 0; i < numRows; i++ ) {
          // if null, show
          if( val == '' ) {
            table.tBodies[0].rows[i].tablefilters[index] = 0;
            if( sum( table.tBodies[0].rows[i].tablefilters ) == 0 ) {
              table.tBodies[0].rows[i].style.display = "";
              }
            continue;
            }
          // if filter returns -1, hide it
          else if(( ! getFilterById( filter ).is( cache.normalized[index][i] )) || ( getFilterById( filter ).filter( val, cache.normalized[index][i], caseSensitive ) == -1 )) {
            table.tBodies[0].rows[i].style.display = "none";
            table.tBodies[0].rows[i].tablefilters[index] = 1;
            continue;
            }
          // otherwise, show it
          else {
            table.tBodies[0].rows[i].tablefilters[index] = 0;
            if( sum( table.tBodies[0].rows[i].tablefilters ) == 0 ) {
              table.tBodies[0].rows[i].style.display = "";
              }
            }
          }
        // store value for next iteration
        $.data( input, "prevValue", val );
        // trigger filter end
        $(table).trigger( "filterEnd" );
        }
/* 
      ** hides rows that don't match defined text
      */
hides rows that don't match defined text
hides rows that don ' t match defined text
function filter( input, cache, table ) {
        var val = $.trim( input.value );
        $(input).removeClass( "invalidFilter" );
        if( $.data( input, "prevValue" ) && ( val === $.data( input, "prevValue" ))) return false;
        var filter = $.data( input, "filter" );
        if( ! getFilterById( filter ).valid( val ) && ( val != '' )) {
          $(input).addClass( "invalidFilter" );
          return false;
          }
        $(table).trigger( "filterStart" );
        var index = input.parentNode.column;
        var caseSensitive = $.data( input, "caseSensitive" );
        var numRows = cache.normalized[0].length; 
        for( i = 0; i < numRows; i++ ) {
          if( val == '' ) {
            table.tBodies[0].rows[i].tablefilters[index] = 0;
            if( sum( table.tBodies[0].rows[i].tablefilters ) == 0 ) {
              table.tBodies[0].rows[i].style.display = "";
              }
            continue;
            }
          else if(( ! getFilterById( filter ).is( cache.normalized[index][i] )) || ( getFilterById( filter ).filter( val, cache.normalized[index][i], caseSensitive ) == -1 )) {
            table.tBodies[0].rows[i].style.display = "none";
            table.tBodies[0].rows[i].tablefilters[index] = 1;
            continue;
            }
          else {
            table.tBodies[0].rows[i].tablefilters[index] = 0;
            if( sum( table.tBodies[0].rows[i].tablefilters ) == 0 ) {
              table.tBodies[0].rows[i].style.display = "";
              }
            }
          }
        $.data( input, "prevValue", val );
        $(table).trigger( "filterEnd" );
        }
function filter ( input , cache , table ) { var val = $ . trim ( input . value ) ; $ ( input ) . removeClass ( "invalidFilter" ) ; if ( $ . data ( input , "prevValue" ) && ( val === $ . data ( input , "prevValue" ) ) ) return false ; var filter = $ . data ( input , "filter" ) ; if ( ! getFilterById ( filter ) . valid ( val ) && ( val != '' ) ) { $ ( input ) . addClass ( "invalidFilter" ) ; return false ; } $ ( table ) . trigger ( "filterStart" ) ; var index = input . parentNode . column ; var caseSensitive = $ . data ( input , "caseSensitive" ) ; var numRows = cache . normalized [ 0 ] . length ; for ( i = 0 ; i < numRows ; i ++ ) { if ( val == '' ) { table . tBodies [ 0 ] . rows [ i ] . tablefilters [ index ] = 0 ; if ( sum ( table . tBodies [ 0 ] . rows [ i ] . tablefilters ) == 0 ) { table . tBodies [ 0 ] . rows [ i ] . style . display = "" ; } continue ; } else if ( ( ! getFilterById ( filter ) . is ( cache . normalized [ index ] [ i ] ) ) || ( getFilterById ( filter ) . filter ( val , cache . normalized [ index ] [ i ] , caseSensitive ) == - 1 ) ) { table . tBodies [ 0 ] . rows [ i ] . style . display = "none" ; table . tBodies [ 0 ] . rows [ i ] . tablefilters [ index ] = 1 ; continue ; } else { table . tBodies [ 0 ] . rows [ i ] . tablefilters [ index ] = 0 ; if ( sum ( table . tBodies [ 0 ] . rows [ i ] . tablefilters ) == 0 ) { table . tBodies [ 0 ] . rows [ i ] . style . display = "" ; } } } $ . data ( input , "prevValue" , val ) ; $ ( table ) . trigger ( "filterEnd" ) ; }
hides rows that don't match defined text
hides rows that don ' t match defined text
// dont do anything if unchanged // dont do anything if invalid for filter // trigger filter start // get column index // case sensitive? // store to avoid reevaluation // if null, show // if filter returns -1, hide it // otherwise, show it // store value for next iteration // trigger filter end