mirror of
https://github.com/Llloooggg/Dyxless.git
synced 2026-03-06 10:46:24 +03:00
30 lines
877 B
JavaScript
30 lines
877 B
JavaScript
document.addEventListener('DOMContentLoaded', () => {
|
|
|
|
const $navbarBurgers = Array.prototype.slice.call(document.querySelectorAll('.navbar-burger'), 0);
|
|
|
|
if ($navbarBurgers.length > 0) {
|
|
|
|
$navbarBurgers.forEach(el => {
|
|
el.addEventListener('click', () => {
|
|
|
|
const target = el.dataset.target;
|
|
const $target = document.getElementById(target);
|
|
|
|
el.classList.toggle('is-active');
|
|
$target.classList.toggle('is-active');
|
|
|
|
});
|
|
});
|
|
}
|
|
|
|
});
|
|
|
|
document.addEventListener('DOMContentLoaded', () => {
|
|
(document.querySelectorAll('.notification .delete') || []).forEach(($delete) => {
|
|
const $notification = $delete.parentNode;
|
|
|
|
$delete.addEventListener('click', () => {
|
|
$notification.parentNode.removeChild($notification);
|
|
});
|
|
});
|
|
}); |