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

does swipe need to be destroyed #66

Closed
SubaruWRX55 opened this issue May 8, 2012 · 1 comment
Closed

does swipe need to be destroyed #66

SubaruWRX55 opened this issue May 8, 2012 · 1 comment

Comments

@SubaruWRX55
Copy link

I'm working on a dynamic web page that may need to generate different image slide show based on user interactions. So a workflow may look like create new swipe -> destroy swipe -> change images in dom -> new swipe.

My question is do i need to do anything specific to destroy swipe. One thing I can think of is the stop it so there is no set time out action. Is it the right way?

if (slider) {
  slider.stop(); // this will stop the set time out function
}
slider = new Swipe(document.getElementById('summary-slider'), {  
     speed: 400,
     auto: 2500         
});
@thebird
Copy link
Owner

thebird commented May 19, 2012

In the next version of Swipe (Swipe2) there will be a kill() function for this exact use case. You can take a look at it in the Swipe2 branch.

@thebird thebird closed this as completed Mar 11, 2013
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