fix(mobile/menu): Hides menu when scroll down and shows when scroll up
This commit is contained in:
parent
b3076efb2b
commit
14ec597b85
@ -4,10 +4,6 @@
|
|||||||
padding: 1em 1em 0;
|
padding: 1em 1em 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dropdown-item {
|
|
||||||
font-size: .75em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.simu-clone {
|
.simu-clone {
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
}
|
}
|
||||||
@ -175,6 +171,12 @@
|
|||||||
##Screen = B/w 481px to 767px
|
##Screen = B/w 481px to 767px
|
||||||
*/
|
*/
|
||||||
@media (min-width: 481px) and (max-width: 767px) {
|
@media (min-width: 481px) and (max-width: 767px) {
|
||||||
|
.dropdown-item {
|
||||||
|
font-size: .75em;
|
||||||
|
}
|
||||||
|
.sticky-top {
|
||||||
|
position: fixed;
|
||||||
|
}
|
||||||
.logo > img {
|
.logo > img {
|
||||||
height: 20px;
|
height: 20px;
|
||||||
}
|
}
|
||||||
@ -353,6 +355,12 @@
|
|||||||
##Screen = B/w 320px to 479px
|
##Screen = B/w 320px to 479px
|
||||||
*/
|
*/
|
||||||
@media (min-width: 320px) and (max-width: 480px) {
|
@media (min-width: 320px) and (max-width: 480px) {
|
||||||
|
.dropdown-item {
|
||||||
|
font-size: .75em;
|
||||||
|
}
|
||||||
|
.sticky-top {
|
||||||
|
position: fixed;
|
||||||
|
}
|
||||||
.logo > img {
|
.logo > img {
|
||||||
height: 20px;
|
height: 20px;
|
||||||
}
|
}
|
||||||
|
@ -218,16 +218,14 @@
|
|||||||
var navbarSupportedContent = $('#navbarSupportedContent');
|
var navbarSupportedContent = $('#navbarSupportedContent');
|
||||||
mywindow.scroll(function () {
|
mywindow.scroll(function () {
|
||||||
newscroll = mywindow.scrollTop();
|
newscroll = mywindow.scrollTop();
|
||||||
if (!navbarSupportedContent.hasClass('show')) {
|
if (newscroll > mypos && !up) {
|
||||||
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
Block a user