template/html/jquery-tablesorter.js
function( c ) {
         var $sorted, indx, column,
          list = c.sortList,
          len = list.length,
          none = ts.css.sortNone + ' ' + c.cssNone,
          css = [ ts.css.sortAsc + ' ' + c.cssAsc, ts.css.sortDesc + ' ' + c.cssDesc ],
          cssIcon = [ c.cssIconAsc, c.cssIconDesc, c.cssIconNone ],
          aria = [ 'ascending', 'descending' ],
         // find the footer
          $headers = c.$table
           .find( 'tfoot tr' )
           .children( 'td, th' )
           .add( $( c.namespace + '_extra_headers' ) )
           .removeClass( css.join( ' ' ) );
         // remove all header information
         c.$headers
          .removeClass( css.join( ' ' ) )
          .addClass( none )
          .attr( 'aria-sort', 'none' )
          .find( '.' + ts.css.icon )
          .removeClass( cssIcon.join( ' ' ) )
          .addClass( cssIcon[ 2 ] );
         for ( indx = 0; indx < len; indx++ ) {
            // direction = 2 means reset!
            if ( list[ indx ][ 1 ] !== 2 ) {
               // multicolumn sorting updating - see #1005
               // .not(function(){}) needs jQuery 1.4
               // filter(function(i, el){}) <- el is undefined in jQuery v1.2.6
               $sorted = c.$headers.filter( function( i ) {
                  // only include headers that are in the sortList (this includes colspans)
                  var include = true,
                   $el = c.$headers.eq( i ),
                   col = parseInt( $el.attr( 'data-column' ), 10 ),
                   end = col + c.$headers[ i ].colSpan;
                  for ( ; col < end; col++ ) {
                     include = include ? include || ts.isValueInArray( col, c.sortList ) > -1 : false;
                  }
                  return include;
               });

               // choose the :last in case there are nested columns
               $sorted = $sorted
                .not( '.sorter-false' )
                .filter( '[data-column="' + list[ indx ][ 0 ] + '"]' + ( len === 1 ? ':last' : '' ) );
               if ( $sorted.length ) {
                  for ( column = 0; column < $sorted.length; column++ ) {
                     if ( !$sorted[ column ].sortDisabled ) {
                        $sorted
                         .eq( column )
                         .removeClass( none )
                         .addClass( css[ list[ indx ][ 1 ] ] )
                         .attr( 'aria-sort', aria[ list[ indx ][ 1 ] ] )
                         .find( '.' + ts.css.icon )
                         .removeClass( cssIcon[ 2 ] )
                         .addClass( cssIcon[ list[ indx ][ 1 ] ] );
                     }
                  }
                  // add sorted class to footer & extra headers, if they exist
                  if ( $headers.length ) {
                     $headers
                      .filter( '[data-column="' + list[ indx ][ 0 ] + '"]' )
                      .removeClass( none )
                      .addClass( css[ list[ indx ][ 1 ] ] );
                  }
               }
            }
         }
         // add verbose aria labels
         len = c.$headers.length;
         for ( indx = 0; indx < len; indx++ ) {
            ts.setColumnAriaLabel( c, c.$headers.eq( indx ) );
         }
      }
function( c ) {
         var $sorted, indx, column,
          list = c.sortList,
          len = list.length,
          none = ts.css.sortNone + ' ' + c.cssNone,
          css = [ ts.css.sortAsc + ' ' + c.cssAsc, ts.css.sortDesc + ' ' + c.cssDesc ],
          cssIcon = [ c.cssIconAsc, c.cssIconDesc, c.cssIconNone ],
          aria = [ 'ascending', 'descending' ],
         // find the footer
          $headers = c.$table
           .find( 'tfoot tr' )
           .children( 'td, th' )
           .add( $( c.namespace + '_extra_headers' ) )
           .removeClass( css.join( ' ' ) );
         // remove all header information
         c.$headers
          .removeClass( css.join( ' ' ) )
          .addClass( none )
          .attr( 'aria-sort', 'none' )
          .find( '.' + ts.css.icon )
          .removeClass( cssIcon.join( ' ' ) )
          .addClass( cssIcon[ 2 ] );
         for ( indx = 0; indx < len; indx++ ) {
            // direction = 2 means reset!
            if ( list[ indx ][ 1 ] !== 2 ) {
               // multicolumn sorting updating - see #1005
               // .not(function(){}) needs jQuery 1.4
               // filter(function(i, el){}) <- el is undefined in jQuery v1.2.6
               $sorted = c.$headers.filter( function( i ) {
                  // only include headers that are in the sortList (this includes colspans)
                  var include = true,
                   $el = c.$headers.eq( i ),
                   col = parseInt( $el.attr( 'data-column' ), 10 ),
                   end = col + c.$headers[ i ].colSpan;
                  for ( ; col < end; col++ ) {
                     include = include ? include || ts.isValueInArray( col, c.sortList ) > -1 : false;
                  }
                  return include;
               });

               // choose the :last in case there are nested columns
               $sorted = $sorted
                .not( '.sorter-false' )
                .filter( '[data-column="' + list[ indx ][ 0 ] + '"]' + ( len === 1 ? ':last' : '' ) );
               if ( $sorted.length ) {
                  for ( column = 0; column < $sorted.length; column++ ) {
                     if ( !$sorted[ column ].sortDisabled ) {
                        $sorted
                         .eq( column )
                         .removeClass( none )
                         .addClass( css[ list[ indx ][ 1 ] ] )
                         .attr( 'aria-sort', aria[ list[ indx ][ 1 ] ] )
                         .find( '.' + ts.css.icon )
                         .removeClass( cssIcon[ 2 ] )
                         .addClass( cssIcon[ list[ indx ][ 1 ] ] );
                     }
                  }
                  // add sorted class to footer & extra headers, if they exist
                  if ( $headers.length ) {
                     $headers
                      .filter( '[data-column="' + list[ indx ][ 0 ] + '"]' )
                      .removeClass( none )
                      .addClass( css[ list[ indx ][ 1 ] ] );
                  }
               }
            }
         }
         // add verbose aria labels
         len = c.$headers.length;
         for ( indx = 0; indx < len; indx++ ) {
            ts.setColumnAriaLabel( c, c.$headers.eq( indx ) );
         }
      }
function ( c ) { var $sorted , indx , column , list = c . sortList , len = list . length , none = ts . css . sortNone + ' ' + c . cssNone , css = [ ts . css . sortAsc + ' ' + c . cssAsc , ts . css . sortDesc + ' ' + c . cssDesc ] , cssIcon = [ c . cssIconAsc , c . cssIconDesc , c . cssIconNone ] , aria = [ 'ascending' , 'descending' ] , // find the footer $headers = c . $table . find ( 'tfoot tr' ) . children ( 'td, th' ) . add ( $ ( c . namespace + '_extra_headers' ) ) . removeClass ( css . join ( ' ' ) ) ; // remove all header information c . $headers . removeClass ( css . join ( ' ' ) ) . addClass ( none ) . attr ( 'aria-sort' , 'none' ) . find ( '.' + ts . css . icon ) . removeClass ( cssIcon . join ( ' ' ) ) . addClass ( cssIcon [ 2 ] ) ; for ( indx = 0 ; indx < len ; indx ++ ) { // direction = 2 means reset! if ( list [ indx ] [ 1 ] !== 2 ) { // multicolumn sorting updating - see #1005 // .not(function(){}) needs jQuery 1.4 // filter(function(i, el){}) <- el is undefined in jQuery v1.2.6 $sorted = c . $headers . filter ( function ( i ) { // only include headers that are in the sortList (this includes colspans) var include = true , $el = c . $headers . eq ( i ) , col = parseInt ( $el . attr ( 'data-column' ) , 10 ) , end = col + c . $headers [ i ] . colSpan ; for ( ; col < end ; col ++ ) { include = include ? include || ts . isValueInArray ( col , c . sortList ) > - 1 : false ; } return include ; } ) ; // choose the :last in case there are nested columns $sorted = $sorted . not ( '.sorter-false' ) . filter ( '[data-column="' + list [ indx ] [ 0 ] + '"]' + ( len === 1 ? ':last' : '' ) ) ; if ( $sorted . length ) { for ( column = 0 ; column < $sorted . length ; column ++ ) { if ( ! $sorted [ column ] . sortDisabled ) { $sorted . eq ( column ) . removeClass ( none ) . addClass ( css [ list [ indx ] [ 1 ] ] ) . attr ( 'aria-sort' , aria [ list [ indx ] [ 1 ] ] ) . find ( '.' + ts . css . icon ) . removeClass ( cssIcon [ 2 ] ) . addClass ( cssIcon [ list [ indx ] [ 1 ] ] ) ; } } // add sorted class to footer & extra headers, if they exist if ( $headers . length ) { $headers . filter ( '[data-column="' + list [ indx ] [ 0 ] + '"]' ) . removeClass ( none ) . addClass ( css [ list [ indx ] [ 1 ] ] ) ; } } } } // add verbose aria labels len = c . $headers . length ; for ( indx = 0 ; indx < len ; indx ++ ) { ts . setColumnAriaLabel ( c , c . $headers . eq ( indx ) ) ; } }
/*
██  ██ █████▄ █████▄ ▄████▄ ██████ ██████
██  ██ ██▄▄██ ██  ██ ██▄▄██   ██   ██▄▄
██  ██ ██▀▀▀  ██  ██ ██▀▀██   ██   ██▀▀
▀████▀ ██     █████▀ ██  ██   ██   ██████
/ * ██ ██ █████▄ █████▄ ▄████▄ ██████ ██████ ██ ██ ██▄▄██ ██ ██ ██▄▄██ ██ ██▄▄ ██ ██ ██▀▀▀ ██ ██ ██▀▀██ ██ ██▀▀ ▀████▀ ██ █████▀ ██ ██ ██ ██████