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);
});
// 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);
}
});
});
// Close button functionality
$('.close').on('click', function() {
$main._hide(true);
});
})(jQuery);