Adjust fixed header position when scrolling (#1295420)

pull/165/head
Thomas Bruederli 11 years ago
parent 9675702579
commit cbd8f7c5d2

@ -195,6 +195,7 @@ init_fixed_header: function()
var me = this; var me = this;
$(window).resize(function(){ me.resize() }); $(window).resize(function(){ me.resize() });
$(window).scroll(function(){ me.fixed_header.css({ 'marginLeft': (-$(window).scrollLeft()) + 'px' }) });
} }
else { else {
$(this.fixed_header).find('thead').replaceWith(clone); $(this.fixed_header).find('thead').replaceWith(clone);
@ -221,6 +222,8 @@ resize: function()
$(this.thead).find('tr td').each(function(index) { $(this.thead).find('tr td').each(function(index) {
$(this).css('width', column_widths[index]); $(this).css('width', column_widths[index]);
}); });
$(window).scroll();
}, },
/** /**

Loading…
Cancel
Save