Open an Accordion item with button hyperlink

  • Member
    January 30, 2018 at 8:39 pm #32493

    I have a 1 page navigation website and I would like to use a hyperlink from a button to an Accordion tab. Does this require some Java code? I did find this code on StackOverflow below but I probably need to create a child theme and paste it somewhere or perhaps the Fortuna Theme can handle this already. I have Row ID’s already set up for the major sections but hyperlinks don’t get resolved with #row_id_name when embedded in an Accordion. Thanks.

    $( document ).ready(function() {
     if (window.location.hash) {
       var AccordionSectionNumber = window.location.hash.substring(1);
       AccordionBodyID = $(".accordion .accordion-group:nth-of-type(" + AccordionSectionNumber + ") .accordion-heading a").attr('href')
          if (! (typeof AccordionBodyID === "undefined")) {
            return true;

    Sorry, this forum is for verified users only. Please Login or Register to continue

Comments are closed.