summaryrefslogtreecommitdiff
path: root/src/js
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2024-03-27 15:44:08 +0800
committerlittleblack111 <littleblack11111@gmail.com>2024-03-27 15:44:08 +0800
commitcda39d4085020b9a53661b2998a5bc2d29977701 (patch)
tree444d737252dd2d2ab70a3d7124e741e30b5ec28d /src/js
parent4a2835154ffc7b7356d229d233132c5430d42f86 (diff)
changed to add instead of set to be competiable with other scripts(swup/transition.js)
Diffstat (limited to 'src/js')
-rw-r--r--src/js/header.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/js/header.js b/src/js/header.js
index e6c32068..63f0e6d3 100644
--- a/src/js/header.js
+++ b/src/js/header.js
@@ -18,7 +18,7 @@ mainHeader.innerHTML = `
`;
header.appendChild(mainHeader);
-document.getElementById("btn"+page).setAttribute('class', 'active');
+document.getElementById("btn"+page).classList.add('active');
window.onscroll = event => {
let header = document.querySelector('header');