Carousel Problem

1 reply · opened Jul 1, 2017

MmehmetakyildizJul 1, 2017

The data-lightbox = "gallery-item" attribute works in the active image in the carousel, but it comes in a passive image as a data-lightbox.

Sample image below.
How can we solve this problem?

SSemicolon WebSTAFFJul 3, 2017

Hello,

Thank You so much for reporting this to us! However, unfortunately, we have noticed that this is something which cannot be avoided currently since the Carousel Plugin generates Cloned Images for some reason to make the loop work. There are 2 workarounds for this:

  1. (Recommended) You can consider disabling clicking on the Cloned Images to avoid this issue altogether by adding the following CSS Code:
.owl-item.cloned { pointer-events: none; }
  1. (Not Recommended) You can enable the Lightbox Gallery on the Cloned Items but this will cause duplicate images in the Gallery. You can simply find and delete the following code in the js/functions.js File:
if( element.find('a[data-lightbox="gallery-item"]').parent('.clone').hasClass('clone') ) {
	element.find('a[data-lightbox="gallery-item"]').parent('.clone').find('a[data-lightbox="gallery-item"]').attr('data-lightbox','');
}

if( element.find('a[data-lightbox="gallery-item"]').parents('.cloned').hasClass('cloned') ) {
	element.find('a[data-lightbox="gallery-item"]').parents('.cloned').find('a[data-lightbox="gallery-item"]').attr('data-lightbox','');
}

This will definitely work fine. Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard