Animated Accordion [closed]

Since you already loading JQuery, add the following $(‘document’): (function($) { $(window).load(function() { //lets wait for all to be loaded alert(“Accordion script loaded”); var acc = document.getElementsByClassName(“accordion”); var i; for (i = 0; i < acc.length; i++) { acc[i].onclick = function() { this.classList.toggle(“active”); var panel = this.nextElementSibling; if (panel.style.maxHeight){ panel.style.maxHeight = null; } else { … Read more