1
0
mirror of https://github.com/webslides/WebSlides.git synced 2025-10-04 08:31:42 +02:00

Updated Plugin docs (markdown)

Antonio Laguna
2017-04-19 20:19:17 +02:00
parent 4026501538
commit efbdfa51a0

@@ -1,3 +1,17 @@
## Autoslide
This plugin is included by default but disabled. In order to enable it, the option `autoslide` must be passed as a number which is the number of milliseconds that should take to slide to the next slide.
You may want to control the autoslide manually.
```javascript
const ws = new WebSlides({ autoslide: 5000 }); // Slide every 5 seconds
ws.plugins.autoslide.stop(); // Stop autosliding
ws.plugins.autoslide.play(); // Resume autosliding
ws.plugins.autoslide.stop();
ws.plugins.autoslide.play(2000); // Resume but now every 2 seconds
```
## Click To Nav
This plugin is included by default but disabled. In order to enable it, the option `changeOnClick` must be passed as `true`.
@@ -13,3 +27,19 @@ This will make every click to navigate to the next slide except for clicks that
* `button`.
* `a`.
* Any element with the attribute `data-prevent-nav`.
## Keyboard
### Key Navigation
There's a handful of keys that can be used to achieve navigation within WebSlides. Here's the list:
* `←`: If WebSlides is not vertical, it will go to the previous slide.
* `→`: If WebSlides is not vertical, it will go to the next slide.
* `↑`: If WebSlides is vertical, it will go to the previous slide.
* `↓`: If WebSlides is vertical, it will go to the next slide.
* `Page Up`: Go to the previous slide.
* `Page Down`: Go to the next slide.
* `Space`: Go to the next slide.
* `Home`: Go to the first slide.
* `End`: Go to the last slide.