I have created some custom dots for my Owl Carousel, but I can't get them to be clickable. I have tried the below code, borrowed from another post, but this just makes all the dots go to number 1 on click.
<div id="dots" class="dots">
<div class="item active"><span>1</span></div>
<div class="item"><span>2</span></div>
<div class="item"><span>3</span></div>
<div class="item"><span>4</span></div>
<div class="item"><span>5</span></div>
</div>
<div id="owl-carousel" class="owl-carousel owl-loaded owl-drag">
<div class="owl-stage-outer">
<div class="owl-stage">
<div class="owl-item cloned"> </div>
<div class="owl-item active"> </div>
</div>
</div>
</div>
$(document).ready(function () {
$("#owl-carousel").owlCarousel({
items: 1,
loop: true,
autoplay: false,
dots: true,
dotsData:true,
dotsContainer: '#dots',
nav: true,
dotsEach: true,
navText: ["<img src=''>", "<img src=''>"]
});
$('#dots .item').click(function() {
$('#dots .item').trigger('to.owl.carousel', [$(this).index(), 1000]);
});
});