-
Notifications
You must be signed in to change notification settings - Fork 590
Plugin docs
Antonio Laguna edited this page Apr 19, 2017
·
13 revisions
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.
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 secondsThis plugin is included by default but disabled. In order to enable it, the option changeOnClick must be passed as true.
const ws = new WebSlides({ changeOnClick: true });This will make every click to navigate to the next slide except for clicks that happens on the following elements:
-
input. -
selectoroption. -
button. -
a. - Any element with the attribute
data-prevent-nav.
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.
Create stories with karma — webslides.tv