mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Core: Allow passing headers from multiple rows. See #1116
This commit is contained in:
parent
2983454fda
commit
200fcacb3b
@ -518,11 +518,8 @@
|
|||||||
ts.buildCache( c );
|
ts.buildCache( c );
|
||||||
}
|
}
|
||||||
$cell = ts.getClosest( $( this ), '.' + ts.css.header );
|
$cell = ts.getClosest( $( this ), '.' + ts.css.header );
|
||||||
// reference original table headers and find the same cell
|
// use column index from data-attribute or index of current row; fixes #1116
|
||||||
// don't use $headers or IE8 throws an error - see #987
|
c.last.clickedIndex = $cell.attr( 'data-column' ) || $cell.index();
|
||||||
temp = $headers.index( $cell );
|
|
||||||
c.last.clickedIndex = ( temp < 0 ) ? $cell.attr( 'data-column' ) : temp;
|
|
||||||
// use column index if $headers is undefined
|
|
||||||
cell = c.$headers[ c.last.clickedIndex ];
|
cell = c.$headers[ c.last.clickedIndex ];
|
||||||
if ( cell && !cell.sortDisabled ) {
|
if ( cell && !cell.sortDisabled ) {
|
||||||
ts.initSort( c, cell, e );
|
ts.initSort( c, cell, e );
|
||||||
|
Loading…
Reference in New Issue
Block a user