Fires when the pull option is set to true, and the user pulls the scrolling container beyond the specified pullThreshold.
Fires when the scroller dimensions change (e.g. orientation change or resize)
Fires when the user scrolls through the content.
Bind to scroller scroll event in view init
<div data-role="view" data-init="attachToScroller"> ... </div>
<script>
function attachToScroller(e) {
var scroller = e.view.scroller;
scroller.bind("scroll", function(e) {
console.log(e.scrollTop);
console.log(e.scrollLeft);
});
}
</script>
Event data
-
scrollTop
: Number
- The number of pixels that are hidden from view above the scrollable area.
-
scrollLeft
: Number
- The number of pixels that are hidden from view to the left of the scrollable area.