Is there a way to lock the page scroll when an event like mousemove is triggered? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 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 Respostas
+ 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