Skip to content

Instantly share code, notes, and snippets.

@liuwen-lvtu
Created January 8, 2012 04:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save liuwen-lvtu/1577258 to your computer and use it in GitHub Desktop.
Save liuwen-lvtu/1577258 to your computer and use it in GitHub Desktop.
iscroll-overflow
//from https://github.com/Kronuz/iscroll-overflow
+ // Fix to avoid scrolling up/down the whole screen:
+ if(that.scrollTop <= 0)
+ that.scroller.scrollTop = 1;
+ if(that.scrollTop + that.scroller.offsetHeight >= that.scroller.scrollHeight)
+ that.scroller.scrollTop = that.scroller.scrollHeight - that.scroller.offsetHeight - 1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment