Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery jCarousel - how to remove the jCarousel from an element

I am using jCarousel to have a carousel of images in my page. It works great and I have no complaints, but I am using the tabbing on the page and when I go to another tab, there is an ugly jCarousel error. Basically what I want to do is to remove the jCarousel from my element when I go to 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?

like image 212
Tony Testa Avatar asked Aug 23 '09 14:08

Tony Testa


1 Answers

If need only to remove jCarousel, you can use destroy method http://sorgalla.com/jcarousel/docs/reference/api.html#destroy

like image 180
keypaul Avatar answered Oct 20 '22 06:10

keypaul