Streaming live at 10am (PST)

Make tabs scroll to top of content

Hey,

I have a sticky tab element on my page. When I scroll through the content on and then click another tab the new content of that tab is not brought to the top. I originally was doing this we buttons and anchor ID’s but not I see tabs don’t support that… Can anyone help please?

Also how does one get their tabs to behave like the rest of their elements in containers if you cannot set tab elements within containers? You can see the issues on this page when changing viewport sizes.


Here is my site Read-Only: https://preview.webflow.com/preview/kats-gd-public-one?utm_medium=preview_link&utm_source=designer&utm_content=kats-gd-public-one&preview=0e01223717f13c729c5f0c6d13931308&pageId=5f047640a558709b62e28a7b&mode=preview

Custom code for tabs on click and moving the content to top

(".tab").click( function(){ var tabs_offset = (".tab").offset();
scrollTo(tabs_offset.left, tabs_offset.top);
});

For tabs to behave like containers you can just add the same styling as u do for containers.

Hey @vish! Thanks for your response! Apply this before tag? Is there any renaming involved? It seems like this is not working after I publish.

can u share the published link for me to debug?

@vish Heres the published link: https://www.getdigs.io/new-faq-copy

Try this.This works.

$( document ).ready(function() {

(".tab").click( function(){ var tabs_offset = (".tabs-content").offset();

scrollTo(tabs_offset.left, (tabs_offset.top - 150));
});

});

Hmmmm still no luck with this either

This seems to work for me on this page

https://www.getdigs.io/new-faq-copy