cloding button fix

This commit is contained in:
Tobi 2025-04-27 01:12:04 +02:00
parent 34ab7eec0f
commit 91b942456c

View file

@ -396,19 +396,9 @@
$main._show(location.hash.substr(1), true); $main._show(location.hash.substr(1), true);
}); });
// Add close button functionality // Close button functionality
document.addEventListener('DOMContentLoaded', () => { $('.close').on('click', function() {
// Add click event listeners to all close buttons $main._hide(true);
document.querySelectorAll('.close').forEach(button => {
button.addEventListener('click', () => {
// Find the closest article element
const article = button.closest('article');
if (article) {
// Use the existing _hide method
$main._hide(true);
}
});
});
}); });
})(jQuery); })(jQuery);