Hey - @PoochKingdom this is so useful, thank you. Would you be willing to help me figure out what I'm doing wrong implementing it?
On this page
https://www.careful.industries/test-braid-accordions
I have 4 x accordions, each with 5 items. I would like to create links which when clicked, scroll to the relevant accordion heading/button/content dropdown, and open that accordion content dropdown. I'm OK if they stay open once the link is clicked, but if another is clicked, I'd like the page to jump to the new location and open the accordion content. (So, many accordion content items open at once is OK).
I have a floating menu set up, where I've found the #button-block-e4217f562264d4a2c827-0 to -4 IDs for the first accordion on the page. I have plugged in the jQuery code above in to the footer.
I've got the # links jumping to the relevant accordion <li> item anchor by id. (nb not all accordions are currently linked up), but not opening the related accordion content.
You can see at the side where I've found selector path IDs for the various elements of the first accordion block, and none of those work to open the accordion content, either. For reference:
Streets Accordion:
content block #yui_3_17_2_1_1725290636637_551
ul #yui_3_17_2_1_1725290636637_550
li #yui_3_17_2_1_1725290636637_549
h3 #yui_3_17_2_1_1725290636637_548
button #button-block-e4217f562264d4a2c827-0 et seq
title span #yui_3_17_2_1_1725290636637_547
content dropdown #dropdown-block-e4217f562264d4a2c827-0 et seq
What am I doing wrong? Sadly my js is very limited, this is right at the ends of my ability to fix, and I can't work out how to use dev tools in my browser to debug. I kind of understand some of the words in @Beyondspace's reply, but definitely couldn't write js based on it, sorry.
Your help would be most appreciated.