Looking for assistance with converting JavaScript into jQuery. I am currently working on a website and using an accordion.
var acc = $(".accordion");
var i;
for (i = 0; i < acc.length; i++) {
acc[i].onclick = function(){
this.classList.toggle("active");
this.nextElementSibling.classList.toggle("show");
}
}
Below is the HTML code:
<div id="our-club-accordion">
<button class="accordion">Our Goal</button>
<div class="panel">
</div>
<button class="accordion">Our Mission</button>
<div class="panel">
</div>
</div>