Full Page Tabs - Default To Top

Hello,

I’ve created full-page tab panels for a project rather than using separate pages. By default, when you scroll down on the open tab panel and then click to another tab it lands at the same scrolled spot on the panel as the previously viewed tab (rather than starting at the top).

I’d like to force each panel to open at the top when a tab button is clicked.

Thanks for any help on this!

Read Only: https://preview.webflow.com/preview/test9859?preview=ec9048ad716a4eeb20c527e6c527f51e

Live Page: http://test9859.webflow.io/job/test


Here is my site Read-Only: https://preview.webflow.com/preview/test9859?preview=ec9048ad716a4eeb20c527e6c527f51e

Hi @jobu

I don’t see the custom code I gave you earlier in your project. Can you place it back in?

<script>
$(".job-tab-link").click(function() {
$("html, body").animate({ scrollTop: 0 }, "slow");
return false;
});
</script>
2 Likes

That did the trick! I missed a piece of the code before. Thank you!

1 Like

@PixelGeek

I’m having the same problem with my site. Is there any chance you could modify this code to work for my site? I tried adding it and it didn’t work. Thanks!

Here is my site’s published link: LINK
Here is my site Read-Only: LINK

Hi @PixelGeek, I’m trying to do the same on mobile device with my class .curator-tab-link using your code.

Here is my code, but navigator shows and “Uncaught ReferenceError: $ is not defined”

<script>
$(".job-tab-link").click(function() {
$("html, body").animate({ scrollTop: 0 }, "slow");
return false;
});
</script>  

Thanks for your help !

Hi Nelson,

This custom code doesn’t seem to werk when I add it to my website.

Please have a look at the different tabs of ‘portfolio’, ‘Werkwijze’ and ‘Tarieven’
When you click on one of the tabs, I would like the view to go straight back to the top.

https://preview.webflow.com/preview/br-bedrijfsfotografie?utm_medium=preview_link&utm_source=designer&utm_content=br-bedrijfsfotografie&preview=a8bf2aa741bf39a6e808bbca30d84caf&pageId=5f87fa972f34a3816b617892&mode=preview

Did you fix the problem? I am having issues with the same subject.