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

Adding ability to unbind scroll handler and destroy plugin object #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

snvl1993
Copy link

@snvl1993 snvl1993 commented Jun 18, 2016

Hi!

As i can see there was no ways to destroy plugin. So if somebody uses, for instance turbolinks (issue #5), he faces with problem, when infinity pages from old page still working in the new one.

So i think, it can be useful to get ability to destroy plugin.

Example of usage:

# Bind plugin on page load
$(document).on "turbolinks:load", ->
  $(someElement).infinitePages settings

# Destroy plugin when user leaves the page
$(document).on 'turbolinks:visit', ->
  $(someElement).infinitePages 'destroy'

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

Successfully merging this pull request may close these issues.

1 participant