Init commit
This commit is contained in:
commit
c8835bc274
4 changed files with 409 additions and 0 deletions
17
scripts/main.js
Normal file
17
scripts/main.js
Normal file
|
@ -0,0 +1,17 @@
|
|||
// on page load, parse the location to find the page and go to that section
|
||||
window.onload = function() {
|
||||
let page = window.location.hash.substring(1);
|
||||
console.log(page);
|
||||
if (page === "") {
|
||||
page = "meet";
|
||||
}
|
||||
goToSection(page);
|
||||
}
|
||||
|
||||
function goToSection(page) {
|
||||
document.location = "#" + page;
|
||||
|
||||
let indicator = document.getElementById(page + "Indicator");
|
||||
if (document.querySelector("span.active")) document.querySelector("span.active").classList.remove("active");
|
||||
indicator.classList.add("active")
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue