1
0
mirror of https://github.com/webslides/WebSlides.git synced 2025-09-02 09:33:25 +02:00

Updated Core API (markdown)

Antonio Laguna
2017-08-14 13:05:47 +02:00
parent c6a8f52f17
commit 167ebdbe7b

@@ -27,9 +27,10 @@ WebSlides constructor accepts an object with options.
| `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. |
| `loop` | `boolean` | `true` | Lets WebSlides loop the slides so once it reaches the end, going next will make it go to the first slide. |
| `minWheelDelta` | `number` | `40` | Controls the amount of scroll needed to trigger a navigation. Lower this number to decrease the scroll resistance. |
| `navigateOnScroll` | `number` | `40` | Whether scroll can trigger navigation or not. |
| `scrollWait` | `number` | `450` | Controls the amount of time needed to wait for a scroll transition to happen again. |
| `slideOffset` | `number` | `50` | Amount of sliding needed to trigger a new navigation. |
| `showIndex` | `boolean` | `true` | Controls if the index can be shown. |
```javascript
const ws = new WebSlides({
@@ -37,8 +38,10 @@ const ws = new WebSlides({
changeOnClick = false,
loop = true,
minWheelDelta = 40,
navigateOnScroll = true,
scrollWait = 450,
slideOffset = 50
slideOffset = 50,
showIndex = true
});
```