Opening Accordion with Anchor Links
-
First of all, thank you for making so many important features of Stackable available for free! Even though Elementor still has more features in some ways, we’re transitioning away from Elementor with the help of some of the added functionality in Gutenberg due to plugins like this.
One of the biggest reasons for us to transition away from Elementor are the unreliable and poorly designed accordions. Stackable has better accordions, but despite a couple requests for a way to open accordions via anchor links (using a hashtag at the end of the link with the id of the accordion), this is still unavailable. In fact, even a JavaScript solution in another support request is no longer working. Please make this an inherent part of the accordions in Stackable.
For now, please give me a temporary JavaScript solution to open accordions automatically via anchor links. For example, the “Vegans” accordion should open whenever a user navigates to https://www.veganpolitico.org/links/#vegans. The temporary JavaScript suggestion from the previous support thread is no longer working:
(function($){ $(function(){ $('.lwptoc_item A').click(function(){ var $target = $($(this).attr('href')); if ($target.length) { $target.parents('.ugb-accordion').each(function(){ var $this = $(this); if (!$this.hasClass('ugb-accordion--open')) { $this.addClass('ugb-accordion--open'); } }); } }); }); })(jQuery);
The page I need help with: [log in to see the link]
- The topic ‘Opening Accordion with Anchor Links’ is closed to new replies.