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

Add "destroy" method #73

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

Conversation

mattstauffer
Copy link

Per conversations here: #56 (comment) , I added a "destroy" method that un-binds the Roundabout code and returns the element to its original state.

@retlehs
Copy link

retlehs commented Dec 17, 2012

thanks @mattstauffer - this worked perfect for a responsive site i'm working on when needing to re-init at a certain screen size

@matthewhall
Copy link

This throws errors if autoplay and responsive are enabled due to the stopAutoplay and relayoutChildren methods trying to access non-existant .data("roundabout").

@mattstauffer
Copy link
Author

Hey Matt,
That's great! Could you do a pull request and I'll bring it into this fork?

Thanks,
-matt

On Tue, Apr 16, 2013 at 4:37 AM, Matt Hall [email protected] wrote:

This seems to throw a JS error when autoplay is enabled. I fixed by
adding this to your destroy method:

// Clear autoplay timersclearTimeout(data.autoplayStartTimeout);clearInterval(data.autoplayInterval);

Just after:

// Unbind window listeners$(window).unbind(".roundabout");

Thanks.


Reply to this email directly or view it on GitHubhttps://github.com//pull/73#issuecomment-16435263
.

@matthewhall
Copy link

Sure. I adjusted my original comment as the "fix" I'd provided didn't quite work.

I think I've fixed it properly now. Will provide a pull request once I've properly tested it.

Thanks.

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.

3 participants