Slider auto play

mitaro
Offline
Last seen: 1 year 4 months ago
Fri, 09/01/2017 - 08:41
#1
Slider auto play

Hello, it is possible to implement the auto play function in the slide of the home page

cindy
cindy's picture
Offline
Last seen: 4 days 17 hours ago
Fri, 09/01/2017 - 09:40

Hi,

please open file main.js and search this code:

function aweMainSlider() {
var e = $(".main-slider");
e.owlCarousel({
items: 1,
nav: !0,
dots: !0,
onInitialized: function() {
e.find(".owl-item").each(function() {
var e = $(this),
o = e.find(".main-slider-item"),
a = e.find(".main-slider-image > img");
o.length && a.length && (o.addClass("background"), o.css("background-image", "url(" + a.attr("src") + ")"), a.css({
opacity: 0,
visibility: "hidden"
}))
})
}
})
}

Then add the following code after dots: !0

autoplay:!0,
autoplayTimeout:1000,
autoplayHoverPause:!0

You can check more instruction here https://owlcarousel2.github.io/OwlCarousel2/demos/autoplay.html

Log in or register to post comments