forked from M-Labs/web2019
revert(mobile/shop): Hides menu when scroll down and shows when scroll up
This commit is contained in:
parent
e96c0dc524
commit
d08bfbdcc0
|
@ -218,14 +218,16 @@
|
||||||
var navbarSupportedContent = $('#navbarSupportedContent');
|
var navbarSupportedContent = $('#navbarSupportedContent');
|
||||||
mywindow.scroll(function () {
|
mywindow.scroll(function () {
|
||||||
newscroll = mywindow.scrollTop();
|
newscroll = mywindow.scrollTop();
|
||||||
if (newscroll > mypos && !up) {
|
if (!navbarSupportedContent.hasClass('show')) {
|
||||||
|
if (newscroll > (mypos + 30) && !up) {
|
||||||
$('.container-header').stop().fadeOut();
|
$('.container-header').stop().fadeOut();
|
||||||
up = !up;
|
up = !up;
|
||||||
} else if(newscroll < mypos && up) {
|
} else if(newscroll < (mypos + 30) && up) {
|
||||||
$('.container-header').stop().fadeIn();
|
$('.container-header').stop().fadeIn();
|
||||||
up = !up;
|
up = !up;
|
||||||
}
|
}
|
||||||
mypos = newscroll;
|
}
|
||||||
|
// mypos = newscroll;
|
||||||
});
|
});
|
||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue