I'm using Owl Carousel 2 and trying to make custom dots with text. The custom dots show up but nothing happens when you click them. I.e. when you click a dot it doesn't jump back to the appropriate slide, it just does nothing. How can I get the carousel the go to the appropriate slide when the custom dots are clicked?
The full code is here: https://codepen.io/anon/pen/ZqKaEZ
HTML:
<div class="owl-carousel owl-theme">
<div class="item" data-dot="<span>1</span>">
<img src="https://placehold.it/100">
</div>
<div class="item" data-dot="<span>2</span>">
<img src="https://placehold.it/100">
</div>
<div class="item" data-dot="<span>3</span>">
<img src="https://placehold.it/100">
</div>
<div class="item" data-dot="<span>4</span>">
<img src="https://placehold.it/100">
</div>
JS:
$(document).ready(function(){
$(".owl-carousel").owlCarousel({
autoplay: true,
autoplayTimeout: 4000,
dots: true,
dotsData:true,
loop: true,
margin: 30,
nav: false,
center: false,
items: 1
});
});