Open kennykaye opened 10 years ago
Proposed fix:
On line 265 of jquery.carousel.js change:
opts._carouselWrap.remove();
to
if(opts._carouselWrap)
{
opts._carouselWrap.remove();
}
Yep, I'm running into the same thing. I'm swapping out the carousel with a grid of the images. I destroy the cycle and wrap the elements in a ul and LIs. if I resize the browser while in this grid, it somehow thinks the opts._carouselWrap is still in existence and starts throwing errors.
Same problem, fix works, thx.
Over 2 years later? This fix still works, with cycle2!
Fix works. It's not in yet, so if you're having problems with destroying a carousel this is the way 👍
Error: "Uncaught TypeError: Cannot call method 'remove' of undefined "
This issue occurs when destroying and initializing slideshows with different transitions, i.e.: carousel and fade.
Specifically, when the carousel plugin attempts to call the "remove" method on the "opts._carouselWrap" object, however under this specific circumstance, the carouselWrap object does not exist.