Skip to content

Instantly share code, notes, and snippets.

@moduscreate
Created January 15, 2013 19:10
Show Gist options
  • Select an option

  • Save moduscreate/4541129 to your computer and use it in GitHub Desktop.

Select an option

Save moduscreate/4541129 to your computer and use it in GitHub Desktop.
onScroll : function(scroller, X,Y) {
if (this.getLoading()) {
return;
}
var element = this.element,
cmpWidth = element.getWidth(),
innerElWidth = element.down('.x-inner').getWidth(),
scrollPct = (X / (innerElWidth - cmpWidth));
if (scrollPct >.75) {
console.log('DO LOAD');
this.fetchData();
}
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment