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?
1 reply · opened Jul 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?
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:
.owl-item.cloned { pointer-events: none; }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