Use ul instead of div and BEM naming

This commit is contained in:
Marvin Dalheimer
2019-08-13 08:44:40 +02:00
parent 270a135fca
commit 28dd0fadf9
3 changed files with 15 additions and 13 deletions

View File

@ -2,8 +2,8 @@ const mobileQuery = getComputedStyle(document.body).getPropertyValue("--phoneWid
const isMobile = () => window.matchMedia(mobileQuery).matches;
if(!isMobile()) {
languageSelector = document.getElementsByClassName("language-selector-actual")[0];
moreLanguagesContainer = document.getElementsByClassName("language-selector-more")[0];
languageSelector = document.querySelector(".language-selector-current");
moreLanguagesContainer = document.querySelector(".language-selector__more");
document.body.addEventListener("click", () => {
if (moreLanguagesContainer && !moreLanguagesContainer.classList.contains("hidden")) {