• Resolved plaidside

    (@plaidside)


    Currently, when I click on one of the accordions on this page that I set up, it is fine. But once I click and open a new accordion on the same page, the page automatically closes the first accordion, then automatically takes me to the footer of the page where no blog text can be seen. Is there a way to anchor and re-position the page to the top of the blog instead (for this second accordion page) after the second accordion is opened?

    When the second accordion is above the first accordion opened, this is not a problem. It’s only when the second accordions are listed below the first accordion that this issue seems to occur.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hey,
    Thanks for posting. First I will suggest to you that tabs might be better for usability then accordions when you are planning to add so much content to each. Accordions are not designed to carry this much information and from a usability standpoint regardless of different workarounds, it’s not a very natural thing to interact with if there is that much content.

    In terms of workarounds. You would need to add javascript to your page. Forcing a scroll is usually not a good idea because of again usability but you can add something like this:

    <script>
    jQuery(document).ready(function($){
    jQuery('.panel-group').on('shown.bs.collapse', function  (e) {
    window.scrollTo(0);
    });
    });
    </script>

    Or if you would like each to open and close separately from each other (meaning two open at once) you can use this javascript:

    <script>
    jQuery(document).ready(function($){
    jQuery('.accordion-toggle').attr('data-parent', '');
    });
    </script>

    I hope that helps,

    Ben

    Thread Starter plaidside

    (@plaidside)

    Thank you Ben! The Tabs option was exactly what I was looking for. Thanks for the reminder about this functionality.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Accordion in blog post’ is closed to new replies.