Slideshow command
Create slideshows of images or other HTML elements, even linked ones.
Basic Usage (HTML)
data-jkit="[slideshow:interval=4000;speed=fast;animation=fade]"
Advanced Init (JavaScript)
$('#myelement').jKit('slideshow', { 'interval': '4000', 'speed': 'fast', 'animation': 'fade' });
Options
Option | Values | Default | Description |
---|---|---|---|
shuffle | “yes” or “no” | no | Do you want to shuffle the slides on init? |
interval | Int (Milliseconds) | 3000 | In which interval to replace the slide |
speed | Int or “fast”, “slow” (Milliseconds) | 250 | The duration of the animation in milliseconds, bigger = slower. |
animation | “fade”, “slide” or “none” | fade | The type of animation used for the transition |
easing | String (“linear” or easing plugin option) | linear | The easing behavior of the animation |
on | Event “click” or “mouseover” | Start and stop the slideshow on a specific event |
Events
Event | Description |
---|---|
hideentry | Triggered when a slide is being hidden |
hideentryN | Triggered when a specific slide is being hidden where “N” is the tab index |
showentry | Triggered when a slide is shown |
showentryN | Triggered when a specific slide is shown where “N” is the tab index |
Examples
Basic Example:
This is the normal use case for the slideshow command:
Source:
<div data-jkit="[slideshow:interval=4000;speed=250;animation=fade]"> <a href="http://fredibach.ch" target="_blank"><img src="../img/slides/p1.jpg"></a> <a href="http://fredibach.ch" target="_blank"><img src="../img/slides/p2.jpg"></a> <a href="http://fredibach.ch" target="_blank"><img src="../img/slides/p3.jpg"></a> <a href="http://fredibach.ch" target="_blank"><img src="../img/slides/p4.jpg"></a> <a href="http://fredibach.ch" target="_blank"><img src="../img/slides/p5.jpg"></a> </div>
Headlines:
You don’t have to use images in a slideshow, headlines or any other HTML element is ok, as well:
First Headline
Another Headline
Even More of a Headline
Still not the last headline
The last headline
Source:
<div style="text-align:center;font-size:2em" data-jkit="[slideshow:interval=2000;speed=500;animation=fade]"> <h3>First Headline</h3> <h3>Another Headline</h3> <h3>Even More of a Headline</h3> <h3>Still not the last headline</h3> <h3>The last headline</h3> </div>
Click event:
Start and stop the slideshow on click:
Source:
<div data-jkit="[slideshow:interval=2000;speed=250;animation=fade;on=click]"> <img src="../img/slides/p1.jpg"> <img src="../img/slides/p2.jpg"> <img src="../img/slides/p3.jpg"> <img src="../img/slides/p4.jpg"> <img src="../img/slides/p5.jpg"> </div>
Mouseover event:
Start and stop the slideshow on mouseover and mouseout:
Source:
<div data-jkit="[slideshow:interval=2000;speed=250;animation=fade;on=mouseover]"> <img src="../img/slides/p1.jpg"> <img src="../img/slides/p2.jpg"> <img src="../img/slides/p3.jpg"> <img src="../img/slides/p4.jpg"> <img src="../img/slides/p5.jpg"> </div>
Replacements
There are currently no replacements for this command.
[ Learn more about replacements ]
Discussions
Do you have questions or do you want to suggest new features? Than head over to our new community:
[ jKit Community ]