mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Fix stickyHeaders_attachTo not positioning correctly. See #295
This commit is contained in:
parent
b34bbba563
commit
69be9beb99
@ -1089,7 +1089,7 @@ ts.addWidget({
|
|||||||
margin : 0,
|
margin : 0,
|
||||||
top : stickyOffset,
|
top : stickyOffset,
|
||||||
left : 0,
|
left : 0,
|
||||||
visibility : $attach.length ? 'visible' : 'hidden',
|
visibility : 'hidden',
|
||||||
zIndex : wo.stickyHeaders_zIndex ? wo.stickyHeaders_zIndex : 2
|
zIndex : wo.stickyHeaders_zIndex ? wo.stickyHeaders_zIndex : 2
|
||||||
}),
|
}),
|
||||||
$stickyThead = $stickyTable.children('thead:first').addClass('tablesorter-stickyHeader ' + wo.stickyHeaders),
|
$stickyThead = $stickyTable.children('thead:first').addClass('tablesorter-stickyHeader ' + wo.stickyHeaders),
|
||||||
@ -1108,8 +1108,8 @@ ts.addWidget({
|
|||||||
spacing = parseInt($header.eq(0).css('border-left-width'), 10) * 2;
|
spacing = parseInt($header.eq(0).css('border-left-width'), 10) * 2;
|
||||||
}
|
}
|
||||||
$stickyTable.css({
|
$stickyTable.css({
|
||||||
left : $attach.length ? parseInt($table.css('padding-left'), 10) +
|
left : $attach.length ? parseInt($attach.css('padding-left'), 10) +
|
||||||
parseInt($table.css('margin-left'), 10) + parseInt($table.css('border-left-width'), 10) :
|
parseInt($attach.css('margin-left'), 10) + parseInt($table.css('border-left-width'), 10) :
|
||||||
$thead.offset().left - $win.scrollLeft() - spacing,
|
$thead.offset().left - $win.scrollLeft() - spacing,
|
||||||
width: $table.width()
|
width: $table.width()
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user