Dropdown links to tabs and its content on the same page

I’m tying to achieve the following:
Clicking on a dropdown link in the nav menu on top of the page I want it to jump down to the respective tab (on the same page) with its content open.
I added custom code as suggested in this forum earlier. I was able to make it work but only for the one tab that already has its content open, but not for the others.
See screenshots below.

Clicking here:

Should make it jump to this tab (with its respective content):

I added custom code as follows:

You can see the related classes on top right in the above pictures.

Read-only:

read-only link
https://preview.webflow.com/preview/knicklofts-nextgen?utm_medium=preview_link&utm_source=designer&utm_content=knicklofts-nextgen&preview=a923ad3ce588af1ba355bc767c0be5ce&mode=preview

It may just be a matter of assigning the right classes relative to the code?

Please be aware: I’m still a novice in Webflow (with only some basic knowledge in CSS and Javascript) and generally not super experienced in web design.

I know there’s a 2 year old post on a similar topic but it didn’t help me, and I guess my case is slightly different…?

Any help would be greatly appreciated!

Hi Rapha,

Can you share:
a. Where you took the code from?
b. Link to the live website?

I think (not sure) that your code points to the wrong place to simulate a click. It currently points to the actual tab, but it might need to point to the tab link.
I will know for sure if you add the location which you have taken the code from.