Verified Commit 0772efd5 authored by Thibaut Broggi's avatar Thibaut Broggi
Browse files

Change color of selected tab and fix js

parent 9c22a6a9
......@@ -69,11 +69,19 @@ let draw = function() {
}
let bgColorElems = document.querySelectorAll('.colorpicker input[type="radio"], #step3 input[type="radio"]');
let i;
for (i in bgColorElems) {
for (let i = 0; i < bgColorElems.length; ++i) {
bgColorElems[i].onchange = draw;
}
document.getElementById('step2value').oninput = draw;
document.getElementById('signature').oninput = draw;
window.onload = draw;
let navElems = document.querySelectorAll('nav > a');
for (let i = 0; i < navElems.length; ++i) {
navElems[i].onclick = function(e) {
for (let j = 0; j < navElems.length; ++j) {
navElems[j].classList.remove('active-tab');
}
e.target.classList.add('active-tab');
}
}
......@@ -30,6 +30,10 @@ nav > * {
border-bottom: 1px solid #3b68b0;
}
nav > .active-tab {
background-color: #3b68b0;
}
a {
text-decoration: none;
color: white;
......
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