cssStickyHeader widget: add z-index option. Fixes #466.

This commit is contained in:
Mottie 2013-12-17 17:47:17 -06:00
parent af70287616
commit 33946d4e3e
2 changed files with 12 additions and 7 deletions

View File

@ -384,7 +384,7 @@
<li><a href="example-widget-savesort.html">Save sort widget</a> (v2.0.27)</li>
<li><a href="example-widget-scroller.html">Scroller widget</a> (<span class="version">v2.9</span>).</li>
<li><a href="example-widget-sticky-header.html">Sticky header widget</a> (v2.0.21.1; <span class="version updated">v2.14.4</span>)</li>
<li><a href="example-widget-css-sticky-header.html">css3 sticky header widget</a> (<span class="version">v2.14.2</span>; <span class="version updated">v2.14.4</span>).</li>
<li><a href="example-widget-css-sticky-header.html">Sticky header (css3) widget</a> (<span class="version">v2.14.2</span>; <span class="version updated">v2.14.6</span>).</li>
<li>UITheme widget:
<ul>
<li><a href="example-widget-ui-theme.html">jQuery UI theme</a> (v2.0.9; <span class="version updated">v2.13.3</span>)</li>

View File

@ -1,4 +1,4 @@
/*! tablesorter CSS Sticky Headers widget - updated 12/14/2013 (v2.14.4)
/*! tablesorter CSS Sticky Headers widget - updated 12/17/2013 (v2.14.6)
* Requires a modern browser, tablesorter v2.8+
*/
/*global jQuery: false, unused:false */
@ -11,7 +11,8 @@
options: {
cssStickyHeaders_offset : 0,
cssStickyHeaders_addCaption : false,
cssStickyHeaders_attachTo : null
cssStickyHeaders_attachTo : null,
cssStickyHeaders_zIndex : 10
},
init : function(table, thisWidget, c, wo) {
var $attach = $(wo.cssStickyHeaders_attachTo),
@ -35,9 +36,11 @@
$cells = $cells.add($caption);
}
$cells.css({
"transform": finalY === 0 ? "" : "translate(0px," + finalY + "px)",
"-ms-transform": finalY === 0 ? "" : "translate(0px," + finalY + "px)",
"-webkit-transform": finalY === 0 ? "" : "translate(0px," + finalY + "px)"
"position" : "relative",
"z-index" : wo.cssStickyHeaders_zIndex,
"transform" : finalY === 0 ? "" : "translate(0px," + finalY + "px)",
"-ms-transform" : finalY === 0 ? "" : "translate(0px," + finalY + "px)",
"-webkit-transform" : finalY === 0 ? "" : "translate(0px," + finalY + "px)"
});
});
},
@ -47,7 +50,9 @@
c.$table
.unbind('update updateAll '.split(' ').join(namespace + ' '))
.children('thead, caption').css({
"transform": "",
"position" : "",
"z-index" : "",
"transform" : "",
"-ms-transform" : "",
"-webkit-transform" : ""
});