Accordion block jumping to wrong point in page

  • Hi, hope this makes sense.

    The site I’m working on, the client wants items to show and hide, and had a very specific layout. I managed to do it with the native WordPress accordion but it’s incredibly limited so I’m trying with the GB Pro block.

    What he wants is for there to be a “More” and “Less” clickable item. I managed to get this working by using a custom HTML block to insert a toggle at the end of the accordion block content. However whenever I close an item it doesn’t fold up the way I imagined it would. It works better at the end of the page, but the mid to uppermost accodion items open and close a bit randomly, leaving me in the middle of the closed/open content, instead of the beginning.

    I don’t think I’m explaining this very well so will leave a link to the page in the private section.

    If there’s a better way to achieve this I’m open to suggestions!

    Thanks in advance
    Sarah

  • Hi Sarah,

    I don’t think there’s a way for the browser to jump to the accordion item title when closing the item; the distance is all calculated by the browser.

    This is normal behaviour of the browser, and it’s not something that the block can control, unfortunately!

  • Ah thanks. At least I can tell them that. Much appreciated, cheers 🙂

  • No Problem 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.