jquery-endless-scroll icon indicating copy to clipboard operation
jquery-endless-scroll copied to clipboard

how to destroy/recreate endless scroll.

Open JackieManuja opened this issue 13 years ago • 1 comments

how we can destroy/recreate endless scroll at certain activity/condition in the page with resetting everything like fireSequence /pageSequence along with attributes.

JackieManuja avatar Sep 11 '12 14:09 JackieManuja

EndlessScroll listens the scroll event and executes a function periodically, so you just need to remove the binding and clear the interval.

The constructor returns the pointer to the interval.

var interval;
// Destroy EndlessScroll
if (interval) {
    clearInterval(interval);
    $('#element').unbind('scroll');
}
interval = $('#element').endlessScroll();

alexsegura avatar Oct 18 '12 21:10 alexsegura