AAAaaaaAAAAAAMOUR AMOUR

This commit is contained in:
Ferit Yiğit BALABAN
2022-07-07 23:11:09 +03:00
parent ff9404cd94
commit 45ab291d4b
6 changed files with 191 additions and 23 deletions

View File

@@ -1,13 +1,19 @@
function toggleDropdown() {
let target = document.getElementsByClassName('dropdown')[0];
if (target.classList.contains('hidden')) {
target.classList.remove('hidden');
target.classList.add('flex');
//document.getElementById('container').style.display = 'none';
async function sleep(milliseconds) {
return new Promise(resolve => setTimeout(resolve, milliseconds));
}
async function toggleDropdown() {
let dropdown = document.getElementsByClassName('dropdown')[0];
let navitems = document.getElementsByClassName('dropdown-nav-item');
if (dropdown.classList.contains('hidden')) {
dropdown.classList.remove('hidden');
dropdown.classList.add('flex');
}
else {
target.classList.add('dropdown_close_animation');
target.classList.add('hidden');
target.classList.remove('flex');
dropdown.classList.add('dropdown_close_animation');
await sleep(550);
dropdown.classList.remove('dropdown_close_animation');
dropdown.classList.add('hidden');
dropdown.classList.remove('flex');
}
}