jQuery image animation
Make file name what from 0000 to 9999. (Image files name increase from 0000 to 9999 [Four digits])
imgname0000.jpg imgname-0001.gif imgname_0002.png…
The image files extension shall be png/gif/jpg.
<!-- jQuery library -->
<script src="jquery-1.11.3.js"></script>
<!-- animationImg Javascript file -->
<script src="jquery.animationImg.js"></script>
Specify target!
<img src="../images/animation_0000.png" class="animation_img">
Call .animationImg()
on <img class="animation_img">
. Note that the call must be made inside of a $(document).ready()
call, or the plugin will not work!
$(document).ready(function(){
$('.animation_img').animationImg({
steps: 45,
repeat: false
});
});
Option | Type | Default | Description |
---|---|---|---|
start | number | 0 | Start image number |
steps | number | 10 | Total image length |
duration | number | 30 | Animation duration |
repeat | boolean | true | Repeat animation |
delay | number | 0 | Delay before start anmation |