• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

question regarding prevent default

 
simon tiberius
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


but when moving the scrollbar, the page still moves. how to stop the default behavior? thanks
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can not cancel the scrolling of the page.

You can force the window to be at a certain location, by setting scrollTop inside of that function, but it will be jittery.

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic