Interaction page up [DONE]

Is it possible that when you press the TAB BUTTON, the page is automatically raised up?

Update: I DID IT!

I do not know the code , but I still get it. It simply.

Just add custom code and replace class .tab-button on the class button, clicking which the page is scroll up

<script>
$(function(){

 //Click event
  $('.tab-button').click(function () {
    $("html, body").animate({ scrollTop: "0" },200);
  });

});
</script> 

You can see it when you click on button TAB 14, TAB 15, TAB 16
TEST SITE
http://test65782313341241.webflow.com/
PUBLIC LINK
https://webflow.com/design/test65782313341241?preview=d864a45cd6d86873dd5d115bbdc621a7

Thank you for your attention. Good day)

2 Likes

Hi @Daniel_Ace, not at the moment in the built in interaction, but you can use jQuery to do this, here is an article on stack overflow, how to accomplish this:

http://stackoverflow.com/questions/6677035/jquery-scroll-to-element

You have to play around with this, and identify those elements you want to scroll to, after the tab button is clicked.

I hope this helps, it is a little custom code, but not much, you just give your element you want to scroll to, a class name, and then follow the instructions from the stack overflow article to implement that.

Cheers, Dave

Thanks Dave, now I understand how it works, but I do not understand the code. I used the code from the article and replaced the item ID for which I need to push and item ID to which I need UP, but it does not work ((. I do something wrong.

Here is what I have
https://webflow.com/design/test65782313341241?preview=d864a45cd6d86873dd5d115bbdc621a7

If I click on the TAB BUTTON, the TAB MENU hide, and TAB CONTENT open
When I scroll down the page and click on the TAB BUTTON, which is below, the TAB MENU hide, and TAB CONTENT open, but it does not open at the beginning of the page and I have to scroll to the top of liars.
That’s why I need a function, auto-scroll up, when I click on TAB BUTTON

Can you show me how to do it?

Hi @Daniel_Ace, thanks, I will take a look to see what’s happening :smile: Get back to you soon, cheers, Dave

Thanks @cyberdave ) I will wait