32
rated 0 times
[
35]
[
3]
/ answers: 1 / hits: 22109
/ 8 Years ago, tue, august 30, 2016, 12:00:00
I can't seem to get the owl carousel onchange function to fire off. Here's a snippet of the relevant code, any ideas?
HTML:
<div id=my-carousel class=owl-carousel owl-theme>
<div class=owl-item><img alt= src=pic1/></div>
<div class=owl-item><img alt= src=pic2 /></div>
</div>
JS:
var my = $('#my-carousel');
my.owlCarousel({
autoPlay: true,
autoplaySpeed: 4000,
loop: true,
slideSpeed: 300,
paginationSpeed: 400,
items: 1,
margin: 2
});
my.on('changed.owl.carousel', function(e) {
console.log(test);
});
More From » jquery