Streaming live at 10am (PST)

Tabs (tab link + anchor)

A matter of life and death! I really need to make sure that when I click on the tab link, my windows (tab content) switch and the auto-scroll occurs. That is an anchor link. This can only be done through code, and here is what I was able to do: https://preview.webflow.com/preview/georges-trendy-project-a05e84?utm_medium=preview_link&utm_source=designer&utm_content=georges-trendy-project-a05e84&preview=d97cba1aabb1b29181c8f1d3d4d91c41&mode=preview
here I created the same tab menu from regular links. I hid the native tab menu, (display: none). And with the help of the code, I was able to change the tabs of the content tab. But I still can’t do auto-scroll (anchor link)! Please help solve the problem. What needs to be added? which script needs to be inserted to scroll the page


Here is my site Read-Only: LINK
(how to share your site Read-Only link)

1 Like

the problem is solved by inserting code

tab 2 - this is the id of the tab link
tab-2-open - this is the id of a regular link that performs the function of opening a tab link through javascript

now clicking on a regular link (linkblock) you perform the function of opening a tab. Because by clicking on a regular link, javascript performs the action of clicking on the tab link. You simply hide the main tab link through display: none and the problem is solved. And then just on a regular link do anchor

<script>

('#tab-1-open').click(function () { (’#tab-1’).triggerHandler(‘click’);
});
('#tab-2-open').click(function () { (’#tab-2’).triggerHandler(‘click’);
});

HI George

Can you share your link please to get the full code?