Refactoring exit button.

This commit is contained in:
Sergiotarxz 2023-09-04 01:36:15 +02:00
parent 976558e3f0
commit 758da4f84f
2 changed files with 9 additions and 7 deletions

View File

@ -42,12 +42,14 @@ function addListenersSearch() {
}
const exitSearch = document.querySelector('a.exit-search')
if (exitSearch !== null) {
exitSearch.addEventListener('click', () => {
const searchOverlay = document.querySelector('div.search-overlay');
if (searchOverlay !== null) {
searchOverlay.classList.toggle('active');
}
});
exitSearch.addEventListener('click', onExitSearch)
}
}
function onExitSearch() {
const searchOverlay = document.querySelector('div.search-overlay');
if (searchOverlay !== null) {
searchOverlay.classList.toggle('active');
}
}

File diff suppressed because one or more lines are too long