Skip to content

Commit

Permalink
Added docu for getScrollTop. Fixes Prinzhorn#111
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Prinzhorn committed Dec 19, 2012
1 parent 96bc382 commit 30ea9ac
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,10 @@ var offset = s.relativeToAbsolute(document.getElementById('foo'), 'top', 'bottom
//if you now use setScrollTop(offset) or animateTo(offset) #foo's bottom will be perfectly aligned with the top of the viewport.
```

### getScrollTop()

Returns the current scroll offset in pixels. Normalizes different browser quirks and returns the iScroll y-position in case of skrollr.mobile.

### setScrollTop(top)

Sets the top offset using `window.scrollTo(0, top)` on dektop or `iscroll.scrollTo(0, -top)` when using skrollr.mobile.
Expand Down

0 comments on commit 30ea9ac

Please sign in to comment.