jQuery Slideshow is a performant, flexible and developer friendly image slideshow and content carousel plugin. 2KB when gzipped. Download.
Setup is not restricted to a fixed markup pattern. Theoretically almost any content can be placed within a slide. If you are using images you should always specify the width and height attributes so that layout calculations can be done without waiting for the assets to finish downloading.
<div class="slideshow">
<ul class="carousel">
<li class="slide">…</li>
<li class="slide">…</li>
<li class="slide">…</li>
</ul>
</div>
The plugin is instantiated in the usual manner and an instances API can be accessed via element data.
// Create slideshow instances
var $slideshow = $('.slideshow').slides(),
// Access an instance API
api = $slideshow.data('slides');
Global options can be specified via the standard jQuery plugin interface or as data attributes on
individual slideshow elements. Remember that camelCase options should be written as
hyphen-separated attributes, for example the hoverPause
option would be defined
on the element with the data-hover-pause
attribute.
<div class="slideshow"
data-pagination="true"
data-loop="false"
data-transition="crossfade">
".carousel"
.
".slide"
.
false
.
true
.
1
.
true
.
true
.
6000
.
true
.
false
.
false
.
"Next"
.
"Previous"
.
crossfade
or scroll
). Default: "scroll"
.
600
.
"swing"
.
1
.
false
.
false
.
If callbacks are specified as data attributes they must reference functions within the global
(window
) namespace.
boolean
.
boolean
.