You have been unsubscribed from these emails and sorry to see you go.
Korpa
* Add your JavaScript code here.
If you are using the jQuery library, then don't forget to wrap your code inside jQuery.ready() as follows:
jQuery(document).ready(function( $ ){
// Your code in here
});
--
If you want to link a JavaScript file that resides on another server (similar to
), then please use
the "Add HTML Code" page, as this is a HTML code that links a JavaScript file.
End of comment */
const productAccordionBtn = document.querySelectorAll(".product-accordion .btn");
for (let i = 0; i < productAccordionBtn.length; i++) {
productAccordionBtn[i].addEventListener("click", function() {
this.classList.toggle("active");
const board = this.nextElementSibling;
if (board.style.maxHeight) {
board.style.maxHeight = null;
} else {
board.style.maxHeight = board.scrollHeight + "px";
}
});
}