I am using jCarousel to have a carousel of images in my page. It works great and have no complaints, but I am using the tabbing on the page and when I goto another tab, it get an ugly jCarousel error. Basically what I want to do is to remove the jCarousel from my element when I goto a new tab but for the life of me can't figure it out
To add the carousel I am using code like this $("#myelement").jCarousel({ /* config params */});
But I am unsure of how to remove .jCarousel from $("#myelement") any ideas?
In addition to PaDalton's answer, I also detached the resize event from the window as my carousel was inside a (colorbox) popup box.
$(window).unbind('resize.jcarousel');
When the event got triggered, the $(this).dimensions(e)
line sent the alert message as the li node didn't have a size, it thought the the object was to be displayed but without a size it would not be able to compute the carousel dimensions properly.
The error message was Infinite Loop - no width or height set