Option name | Type | Description |
---|---|---|
selector | domelement_or_querystring_or_jqueryobject | The element containing all of the slides, and the optional navigation |
options | object | Object containing settings for the slideshow |
NATION.Utils
NATION.EventDispatcher
Carousel that shows slides in groups, with the number depending on the current styles
The selector must contain one or more elements with class ".js-slide"/".slide", as these are considered the individual slide elements
The selector may also contain navigation, in the form of elements with class "js-next"/"next" and "js-previous"/"previous". This functionality is handled automatically if these are found
The direct parent of the slide elements will be sized and postioned automatically to hold all slides in one row. Somewhere above this you will want an element with a width set, and overflow set to hidden, to hide the 'out of view' slides
Built to work with responsive styles, so the number of slides visible at once can be changed via CSS
Even that fires when the next button is clicked
Event that fires when the previous button is clicked
Event that fires when it's time to automatically move to the next set of slides
Event that fires when the number of slides shown at once has changed. This happens when the browser is resized and the styles change in a media query
Start moving through slides automatically
Stop moving through slides automatically
Return the zero-indexed ID of the slide currently visible on the left
Returns the number of slides visible at any one time
Show the next set of slides
Show the previous set of slides
Option name | Type | Description |
---|---|---|
slideID | number | Zero-indexed ID of the first slide to show |
immediate | boolean | If true, the slide change will happen without an animation |
reverseDirection | boolean | If true, the transition between slidesets will happen by moving the slides right. This can make sense when slideID is less than the currently visible slide ID |
Move to a set of slides starting with the specified slide ID