Gallery command
Create a tab navigation for inline content.
Basic Usage (HTML)
data-jkit="[gallery:event=mouseover]"
Advanced Init (JavaScript)
$('#myelement').jKit('gallery', { 'event': 'mouseover' });
Options
Option | Values | Default | Description |
---|---|---|---|
active | Int | 1 | The initially active image |
event | “click” or “mouseover” | click | On which event should the image change? |
showcaptions | “yes” or “no” | yes | Do you want to show image captions? |
animation | “fade”, “slide” or “none” | none | The type of animation used for the transition |
speed | Int or “fast”, “slow” (Milliseconds) | 500 | The duration of the animation in milliseconds, bigger = slower. |
easing | String (“linear” or easing plugin option) | linear | The easing behavior of the animation |
lightbox | “yes” or “no” | no | If event mouseover is used, a click will open the image in a lightbox |
Events
Event | Description |
---|---|
hideentry | Triggered when an image is being hidden |
showentry | Triggered when an image is shown |
showentryN | Triggered when a specific image is shown where “N” is the frame number |
Examples
Basic example:
A gallery that has the 4th image set as active, has captions and reacts on click:
Source:
<div data-jkit="[gallery:event=click;active=4]"> <img src="../img/slides/p1.jpg" title="Image caption one"> <img src="../img/slides/p2.jpg" title="Image caption two"> <img src="../img/slides/p3.jpg" title="Image caption three"> <img src="../img/slides/p4.jpg" title="Image caption four"> <img src="../img/slides/p5.jpg" title="Image caption five"> </div>
Mouseover example:
On this second example, the images are switched on mouseover and the captions are switched off:
Source:
<div data-jkit="[gallery:event=mouseover;showcaptions=no]"> <img src="../img/slides/p1.jpg" title="Image caption one"> <img src="../img/slides/p2.jpg" title="Image caption two"> <img src="../img/slides/p3.jpg" title="Image caption three"> <img src="../img/slides/p4.jpg" title="Image caption four"> <img src="../img/slides/p5.jpg" title="Image caption five"> </div>
Mouseover with lightbox:
In this example the image opens in a lightbox on click:
Source:
<div data-jkit="[gallery:event=mouseover;showcaptions=no;lightbox=yes]"> <img src="../img/slides/p1.jpg" title="Image caption one"> <img src="../img/slides/p2.jpg" title="Image caption two"> <img src="../img/slides/p3.jpg" title="Image caption three"> <img src="../img/slides/p4.jpg" title="Image caption four"> <img src="../img/slides/p5.jpg" title="Image caption five"> </div>
Animation example:
In this example we’re using animated transitions:
Source:
<div data-jkit="[gallery:event=click;animation=fade;speed=250]"> <img src="../img/slides/p1.jpg" title="Image caption one"> <img src="../img/slides/p2.jpg" title="Image caption two"> <img src="../img/slides/p3.jpg" title="Image caption three"> <img src="../img/slides/p4.jpg" title="Image caption four"> <img src="../img/slides/p5.jpg" title="Image caption five"> </div>
Example CSS
div.jkit-gallery-thumbs img { float: left; margin-top: 6px; margin-right: 6px; width: 136px; height: 40px; border: 2px #000 solid; } div.jkit-gallery-thumbs img.active { border: 2px #E01B49 solid; }
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 ]