Answer the question
In order to leave comments, you need to log in
Why doesn't the menu pop up when clicking on a burger?
For some reason, when you click on a burger, the menu does not appear. Initially, the menu is hidden via transform: translateX(100%) and appears when you click on the burger and add the menu-open class via JS with the translateX(0) property. In debugging, you can see that the menu-open class is being added. I also made sure that when the menu appears, all content moves down by 300px , maybe this somehow prevents the menu from appearing.
All code https://jsfiddle.net/90gsdco8/1/
Website ilyin1ib.beget.tech
.menu {
width: 300px;
background: url(../img/menu-bg.jpg) center no-repeat;
background-size: cover;
height: 100vh;
position: absolute;
right: 0;
top: 0;
padding-right: 100px !important;
transform: translateX(100%);
transition: 0.3s;
}
.menu .open{
transform: translateX(0);
}
var $hamburger = $(".hamburger");
$hamburger.on("click", function(e) {
$(this).toggleClass("is-active");
$('.menu').toggleClass('menu-open');
$('.bg ').toggleClass('bg_show');
$('.content').toggleClass('content_move');
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question