Skip to content

Commit

Permalink
cssStickyHeader widget: add z-index option. Fixes #466.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mottie committed Dec 17, 2013
1 parent af70287 commit 33946d4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ <h4 id="extras">Plugins / Custom Widgets / Custom Parsers</h4>
<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>
Expand Down
17 changes: 11 additions & 6 deletions js/widgets/widget-cssStickyHeaders.js
Original file line number Diff line number Diff line change
@@ -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 */
Expand All @@ -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),
Expand All @@ -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)"
});
});
},
Expand All @@ -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" : ""
});
Expand Down

0 comments on commit 33946d4

Please sign in to comment.