My application features a drawer menu that functions smoothly on desktop, but experiences issues on mobile devices with noticeable lag.
Within the header, I have implemented a boolean value that toggles between true and false upon clicking the hamburger icon. This action adds an 'out' class to the '.container', causing it to slide out. The drawer is positioned absolutely on the page's top right corner. When the 'out' class is applied to the container, it shifts 280px to the right, revealing the drawer.
Below is a simplified version of the HTML and CSS code:
<div class="landing-page-container" ng-class="isMenuOut ? 'out' : ''">
<header/>
<main/>
<footer/>
</div>
<sidebar>
CSS:
.home-slide-menu{
width: 280px;
position: absolute;
top: 0;
right: 0;
bottom: 0;
z-index: -1;
overflow:hidden;
}
.landing-page-container{
right:0;
position: relative;
transition: right 0.2s ease-in 0s;
}
.landing-page-container.out{
right:280px;
overflow: hidden;
}
If the provided details are insufficient for troubleshooting, please do let me know. Any red flags or additional information needed would be greatly appreciated for resolving this issue efficiently.