Accordion link to panel from other page using anchors
-
I would like to link from the menu and other pages to the specific category panel in the accordion and have that link scroll to the panel and open it. Right now I can have this working from the page itself, but from any other page on the site, it scrolls down to the specific category panel, but the panel doesn’t open. Currently I have the “openfirst: true” set to open the first panel
Here is the code I am using to try and scroll down to the accordion panel and open it.
<script> $(document).ready(function(){ // open content that matches the hash var hash = window.location.hash; var thash = hash.substring(hash.lastIndexOf('#'), hash.length); $('.accordion').find('a[href*='+ thash + ']').closest('h3').trigger('click'); } </script>
I am linking in the menus using the following:
/services-2/#Laser_Gum_Therapy
This works on the page /services-2 from the menu, but when I am on another page and select that menu item, it goes to /services-2 and scrolls down to the category item, but it doesn’t open. I have set the compatibility so that to call the accordion I use
[as-accordion]
Any assistance would be very appreciated
Thank you
The page I need help with: [log in to see the link]
- The topic ‘Accordion link to panel from other page using anchors’ is closed to new replies.