Accordion Scroll to top on open? #720
Replies: 3 comments 4 replies
-
You can add |
Beta Was this translation helpful? Give feedback.
-
Hi, thanks for the replies but I can't seem to get it to function. Here's an example of my code in a WordPress Loop:
When the There are several of these Currently when I click a div to open, the page jumps all over the place and doesn't bring the current expanded div into view. |
Beta Was this translation helpful? Give feedback.
-
Hello again. I'm trying to set the scroll speed with scrollIntoView but there aren't any options for that as far as I have discovered. I haven't been able to find any examples of this anywhere with success. Can anyone point me into the right direction? TY- |
Beta Was this translation helpful? Give feedback.
-
Hello.
Does anyone know how to create an accordion that will scroll to the top of each accordion in a loop when opened?
I'm using an accordion to create a feed of data in a WordPress loop and I can't quite figure out how to make sure each new accordion will scroll to the top when opened. Right now when one is opened and another is clicked to open, it closes the current open accordion but jumps all over the place.
Would love to be able to slowly have the newly opened accordion scroll to the top of the viewport.
Beta Was this translation helpful? Give feedback.
All reactions