You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using jcarousel for displaying covers of photo albums and in a separate jcarousel the photos of the selected album. When I change albums however, the 'mess' of the previous album is still leftover and prevents the newly called instantiation of jcarousel to be properly displayed. In order to get it to work I have to run the following code before calling jcarousel again:
// reset jcarousel plugin leftovers from previous instance
if ($('#photocarousel').data('jcarousel'))
{
var ul = document.createElement('ul');
$('#photocontainer').empty().append(ul); // delete old carousel and create new ul
$("#photocontainer ul").attr("id", "photocarousel").attr("class", "jcarousel-skin-photos");
}
Did I miss any existing support for this? Would it be possible to have something included in the mainstream version? I see on stackoverflow that there are many people struggling with this.
Thanks!
The text was updated successfully, but these errors were encountered:
var carousel = $('#photocarousel').data('jcarousel');
// Clears the carousel
carousel.reset();
// Add items one by one
carousel.add('<div>Item</div>');
carousel.add('<div>Item</div>');
I am using jcarousel for displaying covers of photo albums and in a separate jcarousel the photos of the selected album. When I change albums however, the 'mess' of the previous album is still leftover and prevents the newly called instantiation of jcarousel to be properly displayed. In order to get it to work I have to run the following code before calling jcarousel again:
Did I miss any existing support for this? Would it be possible to have something included in the mainstream version? I see on stackoverflow that there are many people struggling with this.
Thanks!
The text was updated successfully, but these errors were encountered: