function explodeRowspans( $table ) {
// Split multi row cells into multiple cells with the same content
- $table.find( '[rowspan]' ).each(function() {
+ $table.find( 'tbody [rowspan]' ).each(function() {
var rowSpan = this.rowSpan;
this.rowSpan = 1;
var cell = $( this );
// and put the <tfoot> at the end of the <table>
var $sortbottoms = $table.find( 'tr.sortbottom' );
if ( $sortbottoms.length ) {
- $table.append( $( '<tfoot>' ).append( $sortbottoms ) )
+ var $tfoot = $table.find( 'tfoot' );
+ if( $tfoot ) {
+ $tfoot.eq(0).prepend( $sortbottoms );
+ } else {
+ $table.append( $( '<tfoot>' ).append( $sortbottoms ) )
+ }
}
explodeRowspans( $table );
};
return false;
}
+ } )
+ // Allow links in headers to be clicked
+ .find( 'a' ).click( function( e ) {
+ e.stopPropagation();
} );
} );