17 lines
No EOL
648 B
TypeScript
17 lines
No EOL
648 B
TypeScript
let ntpNav = document.querySelectorAll(".ntpBanner");
|
|
|
|
ntpNav.forEach((element) => {
|
|
(<HTMLElement>element).onclick = function (){
|
|
let index = element.getAttribute("data-index");
|
|
let contentID = index + "-Content";
|
|
let contentElement = <HTMLElement> document.getElementById(contentID);
|
|
|
|
if(contentElement.classList.contains("visible")){
|
|
contentElement.classList.remove("visible");
|
|
} else {
|
|
contentElement.classList.add("visible");
|
|
Plotly.relayout(index + "-Delay", {autosize: true});
|
|
Plotly.relayout(index + "-Score", {autosize: true});
|
|
}
|
|
}
|
|
}); |