filmov
tv
Preventing page scroll using JavaScript

Показать описание
If you ever need to temporally disable scrolling on a specific scrollable element, then you will need to use JavaScript or CSS for it. Depending on your use case, you can choose between JavaScript and CSS solutions. Although in general terms the CSS solution is the most adopted one, JavaScript offers you a bit more of control and flexibility and allows you to decide how exactly you want to stop the scrolling.
I have used JS in this site to stop scrolling on video playing/modal on.
I have used JS in this site to stop scrolling on video playing/modal on.