Skip to content

Instantly share code, notes, and snippets.

@nocodesupplyco
Last active December 19, 2022 14:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nocodesupplyco/e4c53ddd751f1656a3767b1fdd7894cf to your computer and use it in GitHub Desktop.
Save nocodesupplyco/e4c53ddd751f1656a3767b1fdd7894cf to your computer and use it in GitHub Desktop.
Control Webflow Anchor Link Smooth Scroll
<!-- Add these to the <body> element -->
<!-- 1 equals default speed, <1 is faster, >1 is slower -->
<body data-scroll-time = 1>...</body>
<!-- Attribute to turn off smooth scroll for people with prefers reduced motion on -->
<body data-wf-reduce-scroll-motion="none">...</body>
// Apply this to project settings, before </body> custom code to apply to all pages -->
$(function() {
document.body.setAttribute('data-wf-reduce-scroll-motion')
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment