Made with
by Alex Iglesias.

Disable scrolling on click

There are some times when you need to prevent the user from scrolling when a certain event occurs. An example could be when a modal is opened after clicking a button.

Get the code