-
AuthorPosts
-
February 17, 2015 at 2:15 am #208236
Rue NelModeratorHey Brian,
I’ve tried some other solution that you can reuse. Try to this to your customizer:
jQuery(document).ready(function($) { var hash = window.location.hash; if (hash != '') { $('.x-accordion-toggle').each(function(){ if ( $(this).attr('href') === hash ) { $(this).removeClass('collapsed'); $(hash).addClass('in').css('height', 'auto'); } }); } });The code above will check on the url with a hashtag. And if the url has a hashtag on it, it will look for the accordion and will try to match the hashtag to one of the accordion to your page. The code will work with other buttons you may have, just make sure to place the correct accordion id in your button href.
e.g.
<a href="your-page-link-here#ACCORDION-ID">button text</a>Please let us know if it works for you.
February 19, 2015 at 11:49 am #210255
bmahoney59ParticipantYes, that works now. Thank you for the help.
-Brian
February 19, 2015 at 7:03 pm #210590
Rue NelModeratorYou are always welcome Brian!
We’re glad that it works for you.
-
AuthorPosts
- The topic ‘Linking to accordion item on another page’ is closed to new replies.
