Images rotation jQuery plugin
Plugin switches the images while you are holding a mouse cursor on the element. Animates both src attribute for images and background-image attribute for any other element.
Live demo: http://sladex.org/images-rotation/
Basic Usage
<div class="images-rotation" data-images='["img/1.jpg", "img/2.jpg", "img/3.jpg", "img/4.jpg"]'> <img src="img/1.jpg" alt=""> </div> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <script src="jquery.images-rotation.min.js"></script> <script> $('.images-rotation').imagesRotation(); </script>Options
imagesPush the images array via Javascript. Default is '[]'dataAttrChange html5 data- attribute name. Default is 'images'imgSelectorjQuery selector for the element to makes changes for. Default is 'img'intervalInterval between one image switches to another, in ms. Default is '1000'intervalFirstTime delay for the very first switch. Default is '500'callbackCallback function, first argument would be the current image url. Default is 'null'
Changelog
0.1.2 (2014/08/12)
background-imagesupport
License
Copyright (c) 2013-2014 sladex, released under the MIT License.