Improved Website Design and Home Page
This commit is contained in:
parent
882d005e8c
commit
a23bc61efe
16 changed files with 360 additions and 36 deletions
23
js/guides.js
Normal file
23
js/guides.js
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
const guideContents = document.querySelectorAll(".guide-content");
|
||||
const guideButtons = document.querySelectorAll(".guide");
|
||||
|
||||
function changeGuide(newID) {
|
||||
guideContents.forEach(content => {
|
||||
if (content.id == newID) {
|
||||
content.style.display = "block";
|
||||
} else {
|
||||
content.style.display = "none";
|
||||
}
|
||||
})
|
||||
|
||||
guideButtons.forEach(button => {
|
||||
let gid = button.id.slice(1);
|
||||
if (gid == newID) {
|
||||
button.classList.add("active");
|
||||
} else {
|
||||
if (button.classList.contains("active")) {
|
||||
button.classList.remove("active");
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue