Skip to content

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