Streaming live at 10am (PST)

Page Scroll Animation on Tab Link Click

I have a Tabs Section with content that must be scrolled down through on narrow viewports, I have added buttons and some custom code (from great tutorial here at the bottom of the Tab Pane so that navigation is possible after scrolling to the bottom of each pane. The problem I now face is that the tab link click doesn’t generate a scroll back to the top of the Tabs section. If anyone knows of a possible solution to creating the page scroll for the tab link?

The tabs are on the Motel Page of the project

Here is my public share link:


If I understand correctly, you want the ‘Previous’ & ‘Next’ buttons to scroll up to the top of the tabs section. You can do that with anchor links:

Thanks for the reply, the previous and next buttons open the previous or next tab, but don’t realign the page to the top of the tabs when clicked, there does not seem to be any possible way to add section links to the tab button? I thought I could possibly add an animation on click but that’s not possible either?? :frowning:

Im wondering does the webflow accordion have the scrolling animation inbuilt, would it be a better option??

I am not sure I understand you.

  1. When you click the tab link (the elements with the ‘w-tab-link’ class) you are already at the top of the tab section because that is where those buttons are. So, there is no need to scroll back up, right?

  2. When you click the Previous & Next buttons (the elements with the class ‘tab-prev’ & ‘tab-next’) you want the page to scroll back up.

Is that correct?

Yes, that is correct. But please note that the ‘tab-prev’ and ‘tab-next’ buttons trigger a click on the corresponding ‘w-tab-link’. So when the previous or next is clicked the corresponding tab will open and id like the page to scroll back to the top of the tab pane to reveal the contents of the next tab.

In that case, my first comment is exactly what you should do to solve that.
here it is:

You sir are a legend, and I apologise that you needed to map the process out, I had it in my head that the scroll had to be added to the tab-link as that was effectively what the prev & next were clicking.
Thanks for your time and patience.

You’re welcome
Happy to help :webflow_heart: