Skip to content
Snippets Groups Projects
Commit aab7a86f authored by Skriv's avatar Skriv
Browse files

var to let/const

parent 30870044
No related branches found
No related tags found
1 merge request!4115Minor cleaning
/* eslint-disable no-unused-vars */
/* eslint-disable no-undef */
/* Accordion 000-250-006 */ /* Accordion 000-250-006 */
/* /*
...@@ -25,13 +23,12 @@ postdisplay["doAccordionSet"] = function (content) { ...@@ -25,13 +23,12 @@ postdisplay["doAccordionSet"] = function (content) {
}; };
postdisplay["doAccordion"] = function (content) { postdisplay["doAccordion"] = function (content) {
var acc = document.getElementsByClassName("accordion"); const acc = document.getElementsByClassName("accordion");
var i;
for (i = 0; i < acc.length; i += 1) { for (let i = 0; i < acc.length; i += 1) {
acc[i].onclick = function () { acc[i].onclick = function () {
this.classList.toggle("active"); this.classList.toggle("active");
var panel = this.nextElementSibling; let panel = this.nextElementSibling;
if (panel === null || panel === undefined) { if (panel === null || panel === undefined) {
panel = document.getElementById(`${this.id }accHidden`); panel = document.getElementById(`${this.id }accHidden`);
if ( panel.style.display === "none" ) { if ( panel.style.display === "none" ) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment