fix mobile menu

This commit is contained in:
MatthieuBarbu 2023-11-02 15:55:57 +01:00
parent 2638093b17
commit 27a3e0094a
1 changed files with 7 additions and 3 deletions

View File

@ -1,10 +1,12 @@
var isHidenUL = true;
function toggleMobileMenu(event) {
event.stopPropagation();
let hidenUL = document.querySelector('#mobile_menu');
//console.log('click event => toggleMobileMenu called')
/* console.log('click event => toggleMobileMenu called');
console.log(hidenUL) */
if (hidenUL && isHidenUL) {
hidenUL.style.display = 'block';
@ -21,7 +23,9 @@ function hideMobileMenu(event) {
let hidenUL = document.querySelector('#mobile_menu');
//console.log('click event => toggleMobileMenu called')
/* console.log('click event => toggleMobileMenu called')
console.log(hidenUL) */
if (hidenUL && !isHidenUL) {
hidenUL.style.display = 'none';
@ -33,7 +37,7 @@ function hideMobileMenu(event) {
let elEvent = document.querySelector('#et_mobile_nav_menu');
//console.log(elEvent)
console.log(elEvent)
if (elEvent) {
document.querySelector('#mobile_menu').style.display = 'none';