1
0
mirror of https://github.com/webslides/WebSlides.git synced 2025-08-21 04:12:01 +02:00

Adding more docs

This commit is contained in:
Antonio Laguna
2017-02-27 20:14:41 +01:00
parent e50193ebb1
commit bc64fcef7e
2 changed files with 17 additions and 0 deletions

16
docs/click-to-nav.md Normal file
View File

@@ -0,0 +1,16 @@
## Click To Nav plugin
This plugin is included by default but disabled. In order to enable it, the option `changeOnClick` must be passed as
`true`.
```javascript
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`.
* `select` or `option`.
* `button`.
* `a`.
* Any element with the attribute `data-prevent-nav`.

View File

@@ -24,6 +24,7 @@ WebSlides constructor accepts an object with options.
| Param | Type | Default | Description | | Param | Type | Default | Description |
|-----------|----------------|-----------|-------------------------------------------------------------------------------| |-----------|----------------|-----------|-------------------------------------------------------------------------------|
| `autoslide` | `number` or `boolean` | `false` | Amount of milliseconds to wait to go to next slide automatically. | | `autoslide` | `number` or `boolean` | `false` | Amount of milliseconds to wait to go to next slide automatically. |
| `changeOnClick` | `boolean` | `false` | If true, clicking on the page will go to the next slide unless it's a clickable element. See [ClickToNav docs](./click-to-nav.md) for more info. |
```javascript ```javascript