I am trying to make the accordion auto expand (as if I clicked the plus button manually) by clicking an item in the menu item.
i.e. I have an accordion with 6 sections and I have a menu with 6 entries.
When I click 1 on the menu I would like it to expand section on the accordian.
I have tried setting the section id to one or #one
I then set the menu to:
All that happens is it loads the page but does not expand the accordion.
Any assistance is greatly appreciated,
This now works (sort of) in the new section.
It works if you are not on the page where the accordion is. So it auto expands via the menu or a link from any other page, BUT:
If you are on the same page and try use the menu to a different accordion section, then nothing happens.
For all other people wanting to know how: You do not need to put the full web site just the page and link:
When I try:
http://website/pagename/#sectionid it crashed the whole thing.
I’ve actually just introduced something called scroll to for the menu. It’s how these pages work on the demo. If you goto Elements > Round Charts, it will scroll down.
The same can be applied to an accordion id.
Goto WP Admin > Menus > Screen Options ( top right ) > Enable CSS Classes > Edit the Menu item you wan the id on and add in the CSS Classes field
scrollTo_IDHEREe.g. the ID is 12345 you would enter
I hope that helps?
I tried above , but same issue, it scrolls there but does not expand the accordion.
I.e. If I click 1 on the menu accordion 1 will expand.
If I then click 2 on the menu (whole on the same page as the accordion) 2 will not expand.
However if I go away from that page to a another page and then click 2 on the menu, it will load the page and 2 will expand.
Does the css classes work only on the active page or also on other pages?
I also have two accordions on one page, not sure if this is causing the issue?
More info, I can see that if I just use the scrollto function it leaves the page off:
If I add it to the url for the menu it works
If I do both page and scrollto function it duplicated the id:
i.e. http://website/page#id#id (duplicate id)
None of the above three will expand any other accordions sections if the accordion page is active.
i.e. Once the page loads the id changes but doe snot expand other accordion sections.
You must be logged in to reply to this topic.