Where can I add custom javascript? (Parallax Theme)

Tourist
24 0 0

Hello, I have added custom HTML and CSS to my product page for an accordion section now all I need is to add the custom javascript, here's the code below...

 

 

var acc = document.getElementsByClassName("accordion");
var i;

for (i = 0; i < acc.length; i++) {
  acc[i].addEventListener("click"function() {
    /* Toggle between adding and removing the "active" class,
    to highlight the button that controls the panel */

    this.classList.toggle("active");

    /* Toggle between hiding and showing the active panel */
    var panel = this.nextElementSibling;
    if (panel.style.display === "block") {
      panel.style.display = "none";
    } else {
      panel.style.display = "block";
    }
  });
}

0 Likes
Explorer
70 3 9

Post on job section?

0 Likes
New Member
13 0 0

It seems no ones able to figured this out

0 Likes