Skip to content

Instantly share code, notes, and snippets.

@ravikiranj
Last active September 26, 2015 07:07
Show Gist options
  • Select an option

  • Save ravikiranj/1058865 to your computer and use it in GitHub Desktop.

Select an option

Save ravikiranj/1058865 to your computer and use it in GitHub Desktop.
Instantiating YUI3 and calling _handleScroll function
YUI().use('node', 'event', 'io-base', function(Y){
var updateInitiated;
var page;
var retries;
var maxRetries;
var allStoriesFetched;
function init(){
var self = this;
//Initialize updateInitiated flag and pagination unit
this.updateInitiated = false;
this.offset = 15;
this.retries = 0;
this.maxRetries = 3;
this.allStoriesFetched = false;
window.onscroll = handleScroll;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment