mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Resizable: Adjust handle position for jQuery v3.3.0+
This commit is contained in:
parent
2b5812e308
commit
08d6c58105
@ -53,6 +53,14 @@
|
|||||||
min-width: 10px;
|
min-width: 10px;
|
||||||
}</style>
|
}</style>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
/* test resizable handle positioning
|
||||||
|
.tablesorter-resizable-handle {
|
||||||
|
background: rgba(255, 0, 0, .4)
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
</style>
|
||||||
|
|
||||||
<script id="js">$(function() {
|
<script id="js">$(function() {
|
||||||
|
|
||||||
$('.narrow-table').tablesorter({
|
$('.narrow-table').tablesorter({
|
||||||
|
@ -168,7 +168,8 @@
|
|||||||
tableHeight -= c.$table.children('tfoot').height();
|
tableHeight -= c.$table.children('tfoot').height();
|
||||||
}
|
}
|
||||||
// subtract out table left position from resizable handles. Fixes #864
|
// subtract out table left position from resizable handles. Fixes #864
|
||||||
startPosition = c.$table.position().left;
|
// jQuery v3.3.0+ appears to include the start position with the $header.position().left; see #1544
|
||||||
|
startPosition = parseFloat($.fn.jquery) >= 3.3 ? 0 : c.$table.position().left;
|
||||||
$handles.each( function() {
|
$handles.each( function() {
|
||||||
var $this = $(this),
|
var $this = $(this),
|
||||||
column = parseInt( $this.attr( 'data-column' ), 10 ),
|
column = parseInt( $this.attr( 'data-column' ), 10 ),
|
||||||
|
Loading…
Reference in New Issue
Block a user