Scroll to top not working

I’m trying to get a a back to top link scroll to the top of my site once a user hits the footer.

I’ve got an ID on my nav and the link pointing to it. It seems to work when I preview the site in webflow but once I publish, it stops working. Not sure if it’s a bug or if I’m doing something wrong.

Any help is appreciated.


Here is my public share link: [LINK][1]
[1]: https://preview.webflow.com/preview/h2yerba?preview=1e82ff970cd206d55fbafb7201994a46

When I follow your link, there’s no link on the Back to top element, and no ID on the nav.

On your published site, there’s a link pointing to a #backtotop ID but no ID in the code :smile:

http://vincent.polenordstudio.fr/snap/5zivv.jpg

1 Like

As @vincent said, the link isn’t defined.

http://puu.sh/lpTPZ/78c16bdeff.png

1 Like

I also noted that your ‘top’ doesn’t have an ID either.

http://puu.sh/lpTTw/91669be924.jpg

2 Likes

Hey guys - thanks for the quick help. I have added the ID to the nav container and the anchor to the “back to top” link in the footer multiple times. Like I said, it works in the Webflow preview.

When going to the dashboard and then back to the designer the links are not there anymore. Pretty frustrating. All the other anchors on the page work fine.

Is there something about adding an ID to the nav that could be a problem?

Add the link, publish the site and give us the regular URL for it to test. i.e. site.webflow.io

AFAIK, if you don’t publish the changes, they don’t get saved. At least, I’ve seen that happen on occasion.

1 Like

I think I finally figured this out. I believe best practice is to link the section, not the nav. Hmm not sure, still feels a bit buggy even though it’s “working” Thanks everyone! :smile:

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.