Use https://github.com/kenwheeler/slick/ instead.
A jQuery slider built around Brad Birdsall's Swipe plugin.
Install via Bower:
$ bower install websolutions/slider --save
The most basic example follows this DOM structure:
<div class="slider">
<div class="slider-wrap">
<div>Slide #1</div>
<div>Slide #2</div>
<div>Slide #3</div>
</div>
</div>
And is initialized like so:
$(".slider").wsol_slider();
Sliders can be destroyed at any time:
$(".slider").data("wsol.slider").destroy();
The plugin also supports the Swipe's other documented API methods.
In addition to Swipe's options, the plugin can be configured as such:
Option | Type | Description | Default |
---|---|---|---|
arrows |
Boolean | If the slider should use previous/next arrows | true |
prevArrow |
String | Markup for the previous arrow | <button type="button" class="slider-prev">Previous</button> |
nextArrow |
String | Markup for the next arrow | <button type="button" class="slider-next">Next</button> |
disabledArrowClass |
String | Class name to apply to disabled arrows | disabled |
paginated |
Boolean | If the slider should use pagination | false |
paginationClass |
String | Class name to apply to the pagination container | slider-pagination |
customPage |
Function | Function to build pagination items | |
currentPageClass |
String | Class name to apply to the current pagination item | current |