diff --git a/Plugin-docs.md b/Plugin-docs.md index 5161f9b..c317359 100644 --- a/Plugin-docs.md +++ b/Plugin-docs.md @@ -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.