scroller issue fixed

This commit is contained in:
prateek srivastava 2019-04-09 19:28:44 +05:30
parent 504a5ec038
commit f2def6c4bc
1 changed files with 4 additions and 0 deletions

View File

@ -40,14 +40,18 @@ window.onload = function () {
if (menubarHeight > windowHeight) {
$(document).scroll(function() {
documentScrollWhenScrolled = $(document).scrollTop();
if (documentScrollWhenScrolled <= differenceInHeight + 70) {
$('.navbar-left').css('top', -documentScrollWhenScrolled + 60 + 'px');
scrollTopValueWhenNavBarFixed = $(document).scrollTop();
} else {
$('.navbar-left').css('top', -(differenceInHeight + moveDistance) + 'px');
}
});
} else if (menubarHeight < windowHeight) {
$(document).scroll(function() {
documentScrollWhenScrolled = $(document).scrollTop();
if (documentScrollWhenScrolled <= differenceInHeight + 70) {
$('.navbar-left').css('top', -documentScrollWhenScrolled + 60 + 'px');
scrollTopValueWhenNavBarFixed = $(document).scrollTop();