summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
Diffstat (limited to 'public')
-rw-r--r--public/js/sticky-headers.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/public/js/sticky-headers.js b/public/js/sticky-headers.js
index 60f294b3..6e6a75e2 100644
--- a/public/js/sticky-headers.js
+++ b/public/js/sticky-headers.js
@@ -6,8 +6,6 @@ $(document).ready(function () {
var timeLanes = $(".shift-calendar .time");
var headers = $(".shift-calendar .header");
var topReference = $(".container-fluid .row");
- var top = headers.offset().top;
- var left = 15;
timeLanes.css({
"position": "relative",
"z-index": 999
@@ -18,6 +16,8 @@ $(document).ready(function () {
});
$(window).scroll(
function () {
+ var top = headers.parent().offset().top;
+ var left = 15;
timeLanes.css({
"left": Math.max(0, $(window).scrollLeft() - left) + "px"
});