Swap command
Swap an image with an automatically preloaded replacement.
Basic Usage (HTML)
data-jkit="[swap]"
Advanced Init (JavaScript)
$('#myelement').jKit('swap', { });
Options
Option | Values | Default | Description |
---|---|---|---|
versions | Comma separated string | _off,_on | The two strings to differenciate the two image versions |
attribute | Element attribute | src | Which element attribute should be swapped? |
Events
Event | Description |
---|---|
active | Triggered on mouseover |
inactive | Triggered on mouseout |
Examples
Basic example:
Swap an image with a preloaded image replacement on mouseover:
Source:
<img src="../img/sample_button_off.png" data-jkit="[swap]">
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 ]