mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-22 20:57:48 +01:00
make it click two times
This commit is contained in:
parent
2e2c43ebf3
commit
a848fbfc19
1 changed files with 16 additions and 5 deletions
|
@ -1481,17 +1481,28 @@ document.getElementById('search').addEventListener('keyup', function () {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
var isPopupOpen = false;
|
||||||
|
|
||||||
document.getElementById('popup-trigger').addEventListener('click', function (event) {
|
function togglePopup() {
|
||||||
event.preventDefault();
|
if (isPopupOpen) {
|
||||||
document.getElementById('popup-container').style.display = 'block';
|
closePopup();
|
||||||
document.body.style.overflow = 'hidden';
|
} else {
|
||||||
});
|
document.getElementById('popup-container').style.display = 'block';
|
||||||
|
document.body.style.overflow = 'hidden';
|
||||||
|
}
|
||||||
|
isPopupOpen = !isPopupOpen;
|
||||||
|
}
|
||||||
|
|
||||||
function closePopup() {
|
function closePopup() {
|
||||||
document.getElementById('popup-container').style.display = 'none';
|
document.getElementById('popup-container').style.display = 'none';
|
||||||
document.body.style.overflow = 'auto';
|
document.body.style.overflow = 'auto';
|
||||||
|
isPopupOpen = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
document.getElementById('popup-trigger').addEventListener('click', function (event) {
|
||||||
|
event.preventDefault();
|
||||||
|
togglePopup();
|
||||||
|
});
|
||||||
// @license-end
|
// @license-end
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in a new issue