sharingsunshine
asked on
Why Won't My Accordion Class Open Up?
I have a page I put the code on to have the accordion style of FAQ's at http://www.henricomg.org/garden-advice/
Unfortunately, it won't open up. I am not familiar with how to troublehoot javascript issues in Chrome.
I followed the directions from this article:
https://www.w3schools.com/howto/howto_js_accordion.asp
Please help me to understand why the accordion won't open up.
Unfortunately, it won't open up. I am not familiar with how to troublehoot javascript issues in Chrome.
I followed the directions from this article:
https://www.w3schools.com/howto/howto_js_accordion.asp
Please help me to understand why the accordion won't open up.
ASKER
that didn't work
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I see what you are pointing out and that answers my question on why it won't work. Unfortunately, Wordpress is adding those automatically. So, I don't even see them in the code portion of the page.
Yes, I am interested so I will post a new question.
Yes, I am interested so I will post a new question.
To create an accordion without JS you use a hidden <input type="checkbox"> control. You can then use CSS using the sibling operator and the checked status of the input to hide / show the accordion.
ASKER
Thanks for the extra answer but it is over my head. This is my new question - can you post an example?
Open in new window