Is there a way to lock the page scroll when an event like mousemove is triggered? | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
+ 1

Is there a way to lock the page scroll when an event like mousemove is triggered?

The page has to stop when the event is triggered, the page offsetTop being variable.

7th Jun 2020, 10:48 AM
🍇 Alex Tușinean 💜
🍇 Alex Tușinean 💜 - avatar
2 Antworten
+ 5
most basic way is to set overflow to hidden for body tag. https://code.sololearn.com/WFetx733agyB/?ref=app
7th Jun 2020, 11:45 AM
Raj Chhatrala
Raj Chhatrala - avatar
0
Wow, it was that easy. 😅 Thanks!
7th Jun 2020, 11:56 AM
🍇 Alex Tușinean 💜
🍇 Alex Tușinean 💜 - avatar