Streaming live at 10am (PST)

Make a div scroll horizontally based on scroll distance

Hey guys! I’m starting a project for a restaurant and I wanna know if it would be possible to do a certain animation. On the menu page I’d like to have a row of buttons that take the user to the respective category on the same page (hyperlink). Now the restaurant has a lot of categories so it’s going to have position sticky to the top of the page and will be scrollable horizontally. What I’m wondering is that as the user scrolls through the menu, if its possible to have the menu navigation automatically scroll horizontally.

For example, when the “salads” section is at the top of the page, the salads button would be the left most button after scrolling left continuously while the page is being scrolled.