package.docs_src.templates.pages.demos.autoplay.hbs Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of owl.carousel Show documentation
Show all versions of owl.carousel Show documentation
Touch enabled jQuery plugin that lets you create beautiful responsive carousel slider.
The newest version!
---
title: Autoplay Demo
subTitle: Autoplay
nav: demos
description: Autoplay usage demo
sort: 4
tags:
- demo
- plugin
---
1
2
3
4
5
6
7
8
9
10
11
12
Play
Stop
{{#markdown }}
### Overview
Autoplay plugin has three options:
```
//default settings:
autoplay:false
autoplayTimeout:5000
autoplayHoverPause:false
```
In this example i've added two buttons with custom events for play and stop:
```
var owl = $('.owl-carousel');
owl.owlCarousel({
items:4,
loop:true,
margin:10,
autoplay:true,
autoplayTimeout:1000,
autoplayHoverPause:true
});
$('.play').on('click',function(){
owl.trigger('play.owl.autoplay',[1000])
})
$('.stop').on('click',function(){
owl.trigger('stop.owl.autoplay')
})
```
{{/markdown }}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy