Accordion within an ordered list in view


This Discussion is public


Hi all,

I am new to creating webpages, and don't have any experience with writing codes, so would be happy for any tips.I have been trying to put in an accordion within the view of the results of a search which is an ordered list. For each record in the results page, I want a expandable section that users can click to expand only if they want to read more. So when I use a CSS accordion, it seems to work for the very first entry, but not for the other entries. I wanted to check if you know any way to fix this, so I can add an accordion within this ordered list. I've attached my code as a pic.

Would appreciate any help- thanks a ton!


CSS Ids must be unique for every element on a page. You're id=Demo1 is the issue. As your page builds and adds records, every accordion will have the same id=Demo1. This will never work and generate errors in your browser's inspection tool.

To fix this, you'll have to figure out a way to assign a unique id to every accordion on the page,

Thanks very much for your suggestion. I am out of my depth here, and will probably need to someone to help. Does anyone know if it is possible to hire someone to help just with this bit?



There are quite a few developers listed on the Hire A Pro tab, myself included:

I'm sure you can find someone you're comfortable with.

Reply to this Discussion