|
|
@ -2,8 +2,8 @@ |
|
|
|
|
|
|
|
|
|
|
|
// header
|
|
|
|
// header
|
|
|
|
toggleOpenX('.lang', '.lang__open', '.lang__list', '.lang__content', false); |
|
|
|
toggleOpenX('.lang', '.lang__open', '.lang__list', '.lang__content', false); |
|
|
|
singleToggleOpenX('#pc-menu','.header__menu-block','.header__pc-menu'); |
|
|
|
singleToggleOpenX('#pc-menu','.header__menu-block','.header__pc-menu', '.header', 'white'); |
|
|
|
singleToggleOpenX('#phone-menu','.header__menu-block','.header__phone-menu'); |
|
|
|
singleToggleOpenX('#phone-menu','.header__menu-block','.header__phone-menu', '.header', 'white'); |
|
|
|
// header
|
|
|
|
// header
|
|
|
|
|
|
|
|
|
|
|
|
// media
|
|
|
|
// media
|
|
|
@ -249,20 +249,32 @@ function toggleOpenX(mainElement, buttonElement ,heightElement, contentElement, |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function singleToggleOpenX(button, content, blockheight) { |
|
|
|
function singleToggleOpenX(button, content, blockheight, removeBlock, removeClass) { |
|
|
|
let thisButton = document.querySelector(button),
|
|
|
|
let thisButton = document.querySelector(button),
|
|
|
|
thisContent = document.querySelector(content), |
|
|
|
thisContent = document.querySelector(content), |
|
|
|
thisBlockheight = document.querySelector(blockheight); |
|
|
|
thisBlockheight = document.querySelector(blockheight); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// if (removeBlock) {
|
|
|
|
|
|
|
|
// let thisRemoveBlock = ;
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
thisButton.onclick = function () { |
|
|
|
thisButton.onclick = function () { |
|
|
|
let height = thisBlockheight.clientHeight; |
|
|
|
let height = thisBlockheight.clientHeight; |
|
|
|
|
|
|
|
|
|
|
|
if (!thisContent.classList .contains('open')) { |
|
|
|
if (!thisContent.classList .contains('open')) { |
|
|
|
thisContent.style.height = `${height}px`; |
|
|
|
thisContent.style.height = `${height}px`; |
|
|
|
thisContent.classList .add('open'); |
|
|
|
thisContent.classList .add('open'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (removeBlock) { |
|
|
|
|
|
|
|
document.querySelector(removeBlock).classList.remove(removeClass); |
|
|
|
|
|
|
|
} |
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|
thisContent.style.height = null; |
|
|
|
thisContent.style.height = null; |
|
|
|
thisContent.classList .remove('open'); |
|
|
|
thisContent.classList .remove('open'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (removeBlock) { |
|
|
|
|
|
|
|
document.querySelector(removeBlock).classList.add(removeClass); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|