Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to destroy/recreate endless scroll. #33

Open
JackieManuja opened this issue Sep 11, 2012 · 1 comment
Open

how to destroy/recreate endless scroll. #33

JackieManuja opened this issue Sep 11, 2012 · 1 comment

Comments

@JackieManuja
Copy link

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

@alexsegura
Copy link

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();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants