From cbd8f7c5d2ca517c42d19ff9b92982be9f539a96 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Wed, 29 Jan 2014 11:27:26 +0100 Subject: [PATCH] Adjust fixed header position when scrolling (#1295420) --- program/js/list.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/program/js/list.js b/program/js/list.js index 022ed3180..c49a8977c 100644 --- a/program/js/list.js +++ b/program/js/list.js @@ -195,6 +195,7 @@ init_fixed_header: function() var me = this; $(window).resize(function(){ me.resize() }); + $(window).scroll(function(){ me.fixed_header.css({ 'marginLeft': (-$(window).scrollLeft()) + 'px' }) }); } else { $(this.fixed_header).find('thead').replaceWith(clone); @@ -221,6 +222,8 @@ resize: function() $(this.thead).find('tr td').each(function(index) { $(this).css('width', column_widths[index]); }); + + $(window).scroll(); }, /**