web-wiki/resources/jquery/jquery.tablesorter.js
/**
	 * Find all header rows in a thead-less table and put them in a <thead> tag.
	 * This only treats a row as a header row if it contains only <th>s (no <td>s)
	 * and if it is preceded entirely by header rows. The algorithm stops when
	 * it encounters the first non-header row.
	 * 
	 * After this, it will look at all rows at the bottom for footer rows
	 * And place these in a tfoot using similar rules.
	 * @param $table jQuery object for a <table>
	 */
Find all header rows in a thead-less table and put them in a  tag.
This only treats a row as a header row if it contains only s (no s)
and if it is preceded entirely by header rows. The algorithm stops when
it encounters the first non-header row.

After this, it will look at all rows at the bottom for footer rows
And place these in a tfoot using similar rules.
@param $table jQuery object for a 
Find all header rows in a thead - less table and put them in a tag . This only treats a row as a header row if it contains only s ( no s ) and if it is preceded entirely by header rows . The algorithm stops when it encounters the first non - header row . After this it will look at all rows at the bottom for footer rows And place these in a tfoot using similar rules . @param $table jQuery object for a
function emulateTHeadAndFoot( $table ) {
		var $rows = $table.find( '> tbody > tr' );
		if( !$table.get(0).tHead ) {
			var $thead = $( '<thead>' );
			$rows.each( function() {
				if ( $(this).children( 'td' ).length > 0 ) {
					return false;
				}
				$thead.append( this );
			} );
			$table.find(' > tbody:first').before( $thead );
		}
		if( !$table.get(0).tFoot ) {
			var $tfoot = $( '<tfoot>' );
			var len = $rows.length;
			for ( var i = len-1; i >= 0; i-- ) {
				if( $( $rows[i] ).children( 'td' ).length > 0 ){
					break;
				}
				$tfoot.prepend( $( $rows[i] ));
			} 
			$table.append( $tfoot );
		}
	}
function emulateTHeadAndFoot ( $table ) { var $rows = $table . find ( '> tbody > tr' ) ; if ( ! $table . get ( 0 ) . tHead ) { var $thead = $ ( '<thead>' ) ; $rows . each ( function ( ) { if ( $ ( this ) . children ( 'td' ) . length > 0 ) { return false ; } $thead . append ( this ) ; } ) ; $table . find ( ' > tbody:first' ) . before ( $thead ) ; } if ( ! $table . get ( 0 ) . tFoot ) { var $tfoot = $ ( '<tfoot>' ) ; var len = $rows . length ; for ( var i = len - 1 ; i >= 0 ; i -- ) { if ( $ ( $rows [ i ] ) . children ( 'td' ) . length > 0 ) { break ; } $tfoot . prepend ( $ ( $rows [ i ] ) ) ; } $table . append ( $tfoot ) ; } }
Find all header rows in a thead-less table and put them in a <thead> tag.
Find all header rows in a thead - less table and put them in a <thead > tag .
// This row contains a <td>, so it's not a header row
 // Stop here
