plugins – Auto-scroll to beginning of accordion item


I need a help with accordion items on my website. My page is organized in such way that there are multiple accordion items, and when one is clicked, it expands and shows the content. If then another accordion is clicked on, the first accordion auto-collapses and the other expands.

The problem is that – when another accordion expands its content, viewing-window is not set to the beginning of this accordion. Depending on the size of the content compared to the content length of the previous accordion, sometimes you have to scroll up to see the content of the accordion you’ve just clicked on. This is not very intuitive…

What I want to ask: Is there a way to ensure the website auto-scrolls to the beginning of the content under a accordion when a certain accordion button is clicked on?

Jakov 1 year 2022-10-30T14:29:08-05:00 0 Answers 0 views 0

Leave an answer