I am trying to create my own accordion for my page to display my posts. I use it in a list format using HTML, and I'm trying to create an effect when you click on each heading to expand it to show additional information.
But I do not want to say six blocks of code for six of the <li> elements that I have on the page.
Is there any way to run it through .each (); perhaps? Instead of creating each section? Try a more dynamic approach.
source share