Simple Java script for rotating images: easy and unobtrusive, using jQuery
A simple Java script using JQuery, named Jarvis, helpful to make your images rotate without any delay.
The preload helps avoid hiccups while loading images at the very own first visit.
All value are customizable, and it may be helpful for several images rotation, even in a WordPress installation (and you know that many scripts are conficting in some way with that platform).
If you find some bugs or want to suggest improvements feel free to post a comment or drop a line.
You can see the script in action in the header of Liquid Sky Design: look at the rotating images, aren’t they cute? =)
Credits for the Jarvis icon image and for the dummy script images to Il Pianeta Naturale.
Author of this script is Nate Grey, a wonderful iPhone application developer, a great mind and a perfect match!
The script is released under a Common Development and Distribution Licence (CDDL), so feel free to download it, modifiy and redistribute but please keep the original author in the starting lines.
Usage:
- download the Jarvis.zip archive (click the link or the image heredown); open the jarvis.js file (using a free text editor like NotePad++);
- load the script with:
<script type="text/javascript" src="yourpath/jarvis.js"></script> (REMEMBER: this line must be placed AFTER the one that loads jQuery); - add in your CSS style the id “rotation”. You can also specify properties like width/height or whatever;
- add:
<img id="rotation" src="defaultImage.jpg"></img>where you want your rotating images; - edit the Jarvis script specifying the images you want, use a comma separated list (no comma for the last entry).
Attention: you must specify the images twice (the second is for preload).
Attention: I suggest the first image you specify here is the same you choose as ’src’ in the <img> tag above; - rotating timeout is set to 3000ms ( 3s ) by default, you can change this in the Jarvis script as well;
- no, there’s no point 7, you should be done. Go refresh =)
You also may find interesting
E ancora:
- Commercial: AELITHA #2
- JQuery: how to present animated slides
- Commercial: AELITHA #3
- Website: Music Project almost ready
- Website Revamp: Arti-Marziali.ch / Analisys





















Homer J. Simpson
