API reference
Methods, properties and events of an Orbit instance.
Methods
| Method | Returns | What it does |
|---|
next() | void | Go to the next slide. |
prev() | void | Go to the previous slide. |
goTo(index) | void | Go to the slide at index (from 0). |
play() / pause() | void | Start or stop autoplay. |
update(options) | void | Change options without rebuilding. |
destroy() | void | Remove Orbit and restore the markup. |
Properties
| Property | Type | What it is |
|---|
index | number | The current slide. |
length | number | How many slides there are. |
options | object | The options in use at the current width. |
Events
jsslider.on('change', ({ index, previous }) => {
console.log(`Moved from ${previous} to ${index}`)
})
| Event | When |
|---|
ready | Orbit has started. |
change | The current slide changed. |
resize | A breakpoint was crossed. |
destroy | Orbit was removed. |