Prevent Body Scroll on Click

When clicking something lock the scroll of <body> if it isn’t already locked (set to overflow: hidden;). This is useful for things like opening modals, a mobile nav, etc. to ensure the user doesn’t have two levels of scrolling occurring at once.

Update the classes of .nav-button and .nav-overlay in the snippet below with the class you use on the mobile menu button and an overlay div that covers the rest of the screen if needed when the mobile menu is open. If you don’t have a separate overlay div, you can also target the native one that is part of the native Nav element in Webflow, which has the class of .w-nav-overlay.

Get hired at Prevent Body Scroll on Click

We've partnered with startups.gallery to help you find new opportunities at the leading startups in design, development, and AI.

Industries

Creators

Have feedback or a question related to this item? Drop us some feedback!

Curated: 
2.11.22

Similar items

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

React Doctor

2.20.26

ui.sh

2.20.26

Markdown Routes with Next.js

2.20.26

React Grab

2.20.26

Mast

3.13.23

Whalesync

1.8.23

Agentation

2.10.26

Ship Studio

2.10.26

Typograph Studio

2.10.26

Jetboost

12.3.19

Fathom Analytics

12.1.22

Audienceful

8.1.22

find-skills skill

1.31.26

Farm Minerals

1.31.26

Mason Wong

1.31.26

Outseta

8.13.20

Slater

6.2.23

Memberstack

12.3.19

Letta

1.23.26

Pencil

1.23.26

Conductor

1.23.26

1820 Productions

1.23.26

The Agent Skills Directory

1.23.26

Everything Claude Code Plugin

1.23.26

Ralph Wiggum

1.23.26

Sanity

1.23.26

Miriad

1.23.26

in progress works

1.23.26

Give your agent a laboratory

1.23.26

textarea.my

1.23.26

BlogSync

1.23.26

Ripplix

1.23.26

Mel Chiri Consulting

1.11.26

Give Claude Code an external monitor

1.11.26

What if you don't need MCP at all?

1.11.26

Chart Your Course - Webflow Course Template

1.11.26

Strudel REPL

1.11.26

Vizcom

1.11.26

UI Skills

1.9.26

rams

1.9.26

Welcome to Gas Town

1.7.26

CookieFlow

1.6.26

Claude Code dangerously-skip-permissions: Safe Usage Guide

1.5.26

Fly

1.5.26

Annnimate

1.5.26

Compound Engineering: How Every Codes With Agents

1.5.26

Claude Code Skills Hub

1.5.26

MagicPath

1.2.26

Design is more than code

12.22.25

Puck

12.22.25

Agent Skills

12.22.25

Institute of Health

12.22.25
Load more

Bummer, no results

Try a different search/filter combo, or drop us some feedback if there is something missing you would love to see!

Reset filters

Subscribe for updates

Get updates on the latest curated resources and be the first to hear of new features.