From 0bdc51bcae792334bc3cc908f936c0d52e69ce0e Mon Sep 17 00:00:00 2001 From: Maarten Hunink Date: Tue, 7 Sep 2021 10:35:12 +0200 Subject: [PATCH] Add 'active' class without replacing all existing classes. --- js/hyperaudio-lite.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/hyperaudio-lite.js b/js/hyperaudio-lite.js index f0551a4..f511c93 100644 --- a/js/hyperaudio-lite.js +++ b/js/hyperaudio-lite.js @@ -256,7 +256,7 @@ class HyperaudioLite { e.classList.remove('active'); }); - target.setAttribute('class', 'active'); + target.classList.add('active'); const timeSecs = parseInt(target.getAttribute('data-m')) / 1000;