function detectFilterForColumn( table, index ) {
        var l = filters.length,
        totalRows = ( table.tBodies[0] && table.tBodies[0].rows.length ) || 0;
        // start at 3 to avoid autodetect of text, regex, and select
        for( var valid = 0, f = 3; f < l; f++ ) {
          for( var j = 0; j < totalRows; j++ ) {
            // this loop may be better written as breaking out when invalid data found
            valid += (
              filters[f].is(
                $.trim( getElementText( table.tBodies[0].rows[j].cells[index] )),
                table,
                table.tBodies[0].rows[j].cells[index]
                )
              ) ? 1 : 0;
            }
          // if everything matches, we are good
          if( valid == totalRows ) return filters[f].id;
          }
        // 0 is text filter
        return filters[0].id;
        }
/*
      ** this is not as efficient as possible but i'm trying to avoid some of the issues i've had with tablesorter's detection
      */
this is not as efficient as possible but i'm trying to avoid some of the issues i've had with tablesorter's detection
this is not as efficient as possible but i ' m trying to avoid some of the issues i ' ve had with tablesorter ' s detection
function detectFilterForColumn( table, index ) {
        var l = filters.length,
        totalRows = ( table.tBodies[0] && table.tBodies[0].rows.length ) || 0;
        for( var valid = 0, f = 3; f < l; f++ ) {
          for( var j = 0; j < totalRows; j++ ) {
            valid += (
              filters[f].is(
                $.trim( getElementText( table.tBodies[0].rows[j].cells[index] )),
                table,
                table.tBodies[0].rows[j].cells[index]
                )
              ) ? 1 : 0;
            }
          if( valid == totalRows ) return filters[f].id;
          }
        return filters[0].id;
        }
function detectFilterForColumn ( table , index ) { var l = filters . length , totalRows = ( table . tBodies [ 0 ] && table . tBodies [ 0 ] . rows . length ) || 0 ; for ( var valid = 0 , f = 3 ; f < l ; f ++ ) { for ( var j = 0 ; j < totalRows ; j ++ ) { valid += ( filters [ f ] . is ( $ . trim ( getElementText ( table . tBodies [ 0 ] . rows [ j ] . cells [ index ] ) ) , table , table . tBodies [ 0 ] . rows [ j ] . cells [ index ] ) ) ? 1 : 0 ; } if ( valid == totalRows ) return filters [ f ] . id ; } return filters [ 0 ] . id ; }
this is not as efficient as possible but i'm trying to avoid some of the issues i've had with tablesorter's detection
this is not as efficient as possible but i ' m trying to avoid some of the issues i ' ve had with tablesorter ' s detection
// start at 3 to avoid autodetect of text, regex, and select // this loop may be better written as breaking out when invalid data found // if everything matches, we are good // 0 is text filter