Open mattstauffer opened 12 years ago
thanks @mattstauffer - this worked perfect for a responsive site i'm working on when needing to re-init at a certain screen size
This throws errors if autoplay
and responsive
are enabled due to the stopAutoplay
and relayoutChildren
methods trying to access non-existant .data("roundabout")
.
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 notifications@github.com 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/fredhq/roundabout/pull/73#issuecomment-16435263 .
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.
Per conversations here: https://github.com/fredhq/roundabout/issues/56#issuecomment-9463306 , I added a "destroy" method that un-binds the Roundabout code and returns the element to its original state.