mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Save position to fix scroller_upAfterSort=false
This should fix issue #1297 - The current position is now saved on scroll so it can be restored after sorting.
This commit is contained in:
parent
3cd39def50
commit
1b321aae40
@ -273,6 +273,10 @@
|
|||||||
$tableWrap
|
$tableWrap
|
||||||
.off( 'scroll' + namespace )
|
.off( 'scroll' + namespace )
|
||||||
.on( 'scroll' + namespace, function() {
|
.on( 'scroll' + namespace, function() {
|
||||||
|
//Save position
|
||||||
|
wo.scroller_saved[0] = $tableWrap.scrollLeft()
|
||||||
|
wo.scroller_saved[1] = $tableWrap.scrollTop()
|
||||||
|
|
||||||
if ( wo.scroller_jumpToHeader ) {
|
if ( wo.scroller_jumpToHeader ) {
|
||||||
var pos = $win.scrollTop() - $hdr.offset().top;
|
var pos = $win.scrollTop() - $hdr.offset().top;
|
||||||
if ( $( this ).scrollTop() !== 0 && pos < tbHt && pos > 0 ) {
|
if ( $( this ).scrollTop() !== 0 && pos < tbHt && pos > 0 ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user