mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Add WidgetOptions -> stickyHeaders_zIndex option, this allows for the user to customize the zIndex of stickyHeaders to suit the needs of their site
This commit is contained in:
parent
b82d192fc2
commit
74f296adff
@ -848,7 +848,8 @@ ts.addWidget({
|
|||||||
stickyHeaders_offset : 0, // number or jquery selector targeting the position:fixed element
|
stickyHeaders_offset : 0, // number or jquery selector targeting the position:fixed element
|
||||||
stickyHeaders_cloneId : '-sticky', // added to table ID, if it exists
|
stickyHeaders_cloneId : '-sticky', // added to table ID, if it exists
|
||||||
stickyHeaders_addResizeEvent : true, // trigger "resize" event on headers
|
stickyHeaders_addResizeEvent : true, // trigger "resize" event on headers
|
||||||
stickyHeaders_includeCaption : true // if false and a caption exist, it won't be included in the sticky header
|
stickyHeaders_includeCaption : true, // if false and a caption exist, it won't be included in the sticky header
|
||||||
|
stickyHeaders_zIndex : 2 // The zIndex of the stickyHeaders, allows the user to adjust this to their needs
|
||||||
},
|
},
|
||||||
format: function(table, c, wo){
|
format: function(table, c, wo){
|
||||||
if (c.$table.hasClass('hasStickyHeaders')) { return; }
|
if (c.$table.hasClass('hasStickyHeaders')) { return; }
|
||||||
@ -861,6 +862,7 @@ ts.addWidget({
|
|||||||
filterInputs = '.' + (wo.filter_cssFilter || 'tablesorter-filter'),
|
filterInputs = '.' + (wo.filter_cssFilter || 'tablesorter-filter'),
|
||||||
$stickyOffset = isNaN(wo.stickyHeaders_offset) ? $(wo.stickyHeaders_offset) : '',
|
$stickyOffset = isNaN(wo.stickyHeaders_offset) ? $(wo.stickyHeaders_offset) : '',
|
||||||
stickyOffset = $stickyOffset.length ? $stickyOffset.height() || 0 : parseInt(wo.stickyHeaders_offset, 10) || 0,
|
stickyOffset = $stickyOffset.length ? $stickyOffset.height() || 0 : parseInt(wo.stickyHeaders_offset, 10) || 0,
|
||||||
|
stickyzIndex = wo.stickyHeaders_zIndex ? wo.stickyHeaders_zIndex : 2,
|
||||||
$stickyTable = wo.$sticky = $t.clone()
|
$stickyTable = wo.$sticky = $t.clone()
|
||||||
.addClass('containsStickyHeaders')
|
.addClass('containsStickyHeaders')
|
||||||
.css({
|
.css({
|
||||||
@ -868,7 +870,7 @@ ts.addWidget({
|
|||||||
margin : 0,
|
margin : 0,
|
||||||
top : stickyOffset,
|
top : stickyOffset,
|
||||||
visibility : 'hidden',
|
visibility : 'hidden',
|
||||||
zIndex : 2
|
zIndex : stickyzIndex
|
||||||
}),
|
}),
|
||||||
stkyHdr = $stickyTable.children('thead:first').addClass(wo.stickyHeaders),
|
stkyHdr = $stickyTable.children('thead:first').addClass(wo.stickyHeaders),
|
||||||
stkyCells,
|
stkyCells,
|
||||||
|
Loading…
Reference in New Issue
Block a user