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:
16
docs/click-to-nav.md
Normal file
16
docs/click-to-nav.md
Normal 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`.
|
@@ -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
|
||||||
|
Reference in New Issue
Block a user