improved animations for mobile menu

v1.18.x
psychobunny 12 years ago
parent 54f86a912c
commit 2ffd436745

@ -538,6 +538,8 @@ body .navbar .nodebb-inline-block {
} }
#mobile-menu, #mobile-menu-overlay { #mobile-menu, #mobile-menu-overlay {
z-index: 999;
@media (min-width: 979px) @media (min-width: 979px)
{ {
display: none !important; display: none !important;
@ -630,11 +632,10 @@ body .navbar .nodebb-inline-block {
transition: margin-top 250ms ease; transition: margin-top 250ms ease;
margin-top: 20%; margin-top: 20%;
opacity: 0;
&.menu-visible { &.menu-visible {
margin-top: 0%; margin-top: 0%;
opacity: 1;
} }
i { i {

@ -41,10 +41,10 @@ define(function() {
icon.src = 'category/' + category.slug; icon.src = 'category/' + category.slug;
icon.onclick = function() { icon.onclick = function() {
jQuery(overlay).toggleClass('menu-visible'); jQuery('.mobile-menu-icon').toggleClass('menu-visible');
setTimeout(function() { setTimeout(function() {
jQuery('.mobile-menu-icon').toggleClass('menu-visible'); jQuery(overlay).toggleClass('menu-visible');
}, 200); }, 200);
ajaxify.go(this.src); ajaxify.go(this.src);

Loading…
Cancel
Save