summaryrefslogtreecommitdiff
path: root/actualités.html
diff options
context:
space:
mode:
Diffstat (limited to 'actualités.html')
-rw-r--r--actualités.html8
1 files changed, 8 insertions, 0 deletions
diff --git a/actualités.html b/actualités.html
index 99d54ae..606bb74 100644
--- a/actualités.html
+++ b/actualités.html
@@ -73,6 +73,8 @@
var anchor = document.location.hash;
if (anchor.match(/#concert-/)) {
document.querySelector(anchor).classList.add('active');
+ document.querySelector(`a[href="${document.location.hash}"]`)
+ .classList.add('active');
}
document.querySelectorAll('a.event').forEach((link) => {
link.addEventListener('click', function(click) {
@@ -84,6 +86,12 @@
prev.classList.remove('active');
var id = link.attributes['href'].value;
document.querySelector(id).classList.add('active');
+
+ prev = document.querySelector('a.event.active');
+ if (prev) {
+ prev.classList.remove('active');
+ }
+ link.classList.add('active');
});
});
</script>