The owl.carousel.js plugin is used for creating a jQuery slideshow. Initially, the slideshow works correctly, but I noticed that the autoplay feature stops working when I open a new tab in Firefox or Chrome.
Demo : Demo :
$(document).ready(function () {
var owl = $('.owl-carousel');
owl.owlCarousel({
items: 5,
loop:true,
margin: 10,
autoplay: true,
stopOnHover : false,
autoplayTimeout: 1000,
responsive:false,
dots: false
});
$('.play').on('click', function () {
owl.trigger('play.owl.autoplay', [1000])
});
$('.stop').on('click', function () {
owl.trigger('stop.owl.autoplay')
});
});