I'm using owl carousel and decided to add the magnific plugin to it to be able to click on an image in the carousel, view it larger, and then have a lightbox gallery to be able to click through the larger images. Lightbox part works, but it seems to be duplicating all the images when clicking through the lightbox. It's also broke my carousel on the actual website and displays all the images.
$(document).ready(function() {
$(".popup").magnificPopup({
type: "image",
removalDelay: 160,
preloader: false,
fixedContentPos: true,
gallery: {
enabled: true
}
});
});
$(".bootleggers").owlCarousel({
loop: true,
margin: 10,
nav: true,
navText: [
"<i class='fa fa-caret-left'></i>",
"<i class='fa fa-caret-right'></i>"
]
});
body {
background: #f1f1f1;
}
/* image slideshows for events */
.carousel-wrap {
width: 100%;
}
.bootleggers .item {
-webkit-backface-visibility: hidden;
display: inline-block;
}
.item img {
border-radius: 50%;
}
.owl-nav>div {
margin-top: -26px;
position: absolute;
top: 50%;
color: #cdcbcd;
}
.owl-nav i {
font-size: 52px;
}
.owl-nav .owl-prev {
left: -30px;
color: #000;
}
.owl-nav .owl-next {
right: -30px;
color: #000;
}
.aboutrow {
display: flex;
}
.aboutcol {
padding: 1.5em;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
}
.eventname {
font-size: 2.25em;
font-weight: bold;
color: #8d0700;
}
<link rel="stylesheet" href="https://www.w3schools.com/lib/w3.css">
<link rel="stylesheet" href="https://owlcarousel2.github.io/OwlCarousel2/assets/owlcarousel/assets/owl.carousel.min.css">
<link rel="stylesheet" href="https://owlcarousel2.github.io/OwlCarousel2/assets/owlcarousel/assets/owl.theme.default.min.css">
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/1.1.0/magnific-popup.css">
<div class="aboutrow">
<div class="w3-col l4 aboutcol">
<h4 class="cursive eventname">Bootleggers Ball</h4>
<p>Information text</p>
</div>
<div class="w3-col l8 aboutcol">
<div class="carousel-wrap">
<div class="bootleggers owl-carousel">
<a class="item popup" href="http://via.placeholder.com/250x250"><img src="http://via.placeholder.com/250x250" alt="Bootleggers Ball"></a>
<a class="item popup" href="http://via.placeholder.com/250x250"><img src="http://via.placeholder.com/250x250" alt="Bootleggers Ball"></a>
<a class="item popup" href="http://via.placeholder.com/250x250"><img src="http://via.placeholder.com/250x250" alt="Bootleggers Ball"></a>
<a class="item popup" href="http://via.placeholder.com/250x250"><img src="http://via.placeholder.com/250x250" alt="Bootleggers Ball"></a>
<a class="item popup" href="http://via.placeholder.com/250x250"><img src="http://via.placeholder.com/250x250" alt="Bootleggers Ball"></a>
</div>
</div>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script type="text/javascript" src="https://owlcarousel2.github.io/OwlCarousel2/assets/owlcarousel/owl.carousel.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/1.1.0/jquery.magnific-popup.js"></script>
