This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • 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