Scroll menu: change hardcoded height to dynamic value

This commit is contained in:
bergware
2018-10-29 15:35:19 +01:00
parent 27062f3875
commit 78c2bc24c3

View File

@@ -497,7 +497,7 @@ $(window).scroll(function() {
$('.back_to_top').fadeOut(backtotopduration);
}
<?if (strstr('black,white',$display['theme'])):?>
$('div#menu').css($(this).scrollTop()>90 ? {position:'fixed',top:'0'} : {position:'absolute',top:'90px'});
$('div#menu').css($(this).scrollTop() > $('div#header').height() ? {position:'fixed',top:'0'} : {position:'absolute',top:'90px'});
<?endif;?>
});
$('.back_to_top').click(function(event) {