bug fixing

This commit is contained in:
Tobi 2025-04-27 01:09:44 +02:00
parent 7e753fe4cb
commit 34ab7eec0f
3 changed files with 47 additions and 4 deletions

View file

@ -396,4 +396,19 @@
$main._show(location.hash.substr(1), true);
});
// Add close button functionality
document.addEventListener('DOMContentLoaded', () => {
// Add click event listeners to all close buttons
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);