Fix selected tab highlight on next/prev button click

parent 4ded799f
Pipeline #1419 passed with stage
in 32 seconds
......@@ -118,7 +118,7 @@ for (let i = 0; i < navElems.length; ++i) {
}
}
let navButtons = document.querySelectorAll('.prevButton, .nextButton');
let navButtons = document.querySelectorAll('.navButtons > a[href^="#"]');
for (let i = 0; i < navButtons.length; ++i) {
navButtons[i].onclick = function(e) {
document.querySelector('nav > a[href="' + e.target.attributes.href.value + '"]').click();
......@@ -153,7 +153,7 @@ window.addEventListener('load', function() {
}
// Add event listeners to inputs
let bgColorElems = document.querySelectorAll('.colorpicker input[type="radio"], #step3 input[type="radio"], #step4 input[type="radio"]');
let inputs = document.querySelectorAll('.colorpicker input[type="radio"], #step3 input[type="radio"], #step4 input[type="radio"]');
for (let i = 0; i < bgColorElems.length; ++i) {
bgColorElems[i].onchange = draw;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment