cloding button fix
This commit is contained in:
parent
34ab7eec0f
commit
91b942456c
1 changed files with 3 additions and 13 deletions
|
@ -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);
|
Loading…
Add table
Add a link
Reference in a new issue