Answer the question
In order to leave comments, you need to log in
Owl-carousel duplicates fancybox elements, how to disable?
In Owl-carousel I need infinite scroll but it interferes with fancybox gallery, is there any way around this?
Answer the question
In order to leave comments, you need to log in
function addFancy(event) {
var element = event.target;
var id = $(element).attr('id');
$(element).find(".owl-item.cloned a").each(function(indexCloned) {
var $clonedElem = $(this);
var link = $clonedElem.attr('href');
$clonedElem.attr('data-fancybox-trigger', id);
$clonedElem.attr('href', 'javascript:;');
$clonedElem.removeAttr('data-fancybox');
$(element).find(".owl-item:not(.cloned) a").each(function(indexReal) {
if (link === $(this).attr('href')){
$clonedElem.attr('data-fancybox-index', indexReal);
}
});
});
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question