The image carousel plugin is a jQuery UI plugin that displays an unordered list of images as a carousel with forward and back buttons.
The carousel requires jQuery and jQuery UI to work. It is completely themable with jQuery UI.
This plugin is hosted on Google Code. Download the latest version here.
There are no known issues with plugin compatability. Tested in IE 6-8, Firefox 3.5, Google Chrome, Apple Safari 4.0, Opera 10.
Questions and comments will be handled through the Google Code site. Also, if you like this, please check out my Image Overlay plugin.
1.0 - Initial Release.
First, include the Image Carousel CSS file in your page header.
<link rel="stylesheet" type="text/css" href="ImageCarousel.css" />
Next, add the Image Carousel JavaScript file AFTER you include your jQuery/jQuery UI installations. jQuery 1.3.x is required, for compatibility with jQuery UI (which should be at least 1.7.x).
<script type="text/javascript" src="path-to-jQuery/jquery.min.js"></script>
<script type="text/javascript" src="path-to-jQuery-UI/jquery-ui.min.js"></script>
...
<script type="text/javascript" src="jquery.ImageCarousel.min.js"></script>
Create the carousel html. Here are the guidelines you should follow for galleries:
Here is an example of carousel html.
<div class="carousel">
<h2 class="carouselHeader">My Image Gallery</h2>
<div class="carouselBody">
<ul>
<li>
<a href="http://www.google.com">
<img alt="Image 1" src="testImages/Image1.jpg"/>
</a>
</li>
<li>
<a href="http://www.google.com">
<img alt="Image 2" src="testImages/Image2.jpg"/>
</a>
</li>
</ul>
<a href="#" class="btnNext">Next</a>
<a href="#" class="btnPrevious">Previous</a>
</div>
</div>
Finally, attach the Image Carousel control via JavaScript.
$(document).ready(function() {
$('.carousel').ImageCarousel();
});
Here is an example of a carousel load function with options (see directly below for an explanation of available options).
$('.carousel').ImageCarousel({
carousel_width: '200px',
display_header: false,
carousel_speed: 'fast'
});
Shows minimize button in header. Header must be visible for minimize button to be available. Default: true.
Whether to display header in carousel. Overrides allow_minimize. Default: true.
The speed of the carousel animations. Valid values are 'slow', 'normal', 'fast', and numbers for millis. Default: 'normal'.
The width of the images carousel. Default: '500px'
This plugin supports the metadata plugin. You must have the metadata plugin installed to use these features. Refer to metadata plugin documentation for instructions.
In order to override or add additional options on the carousel, you can just add the options after your carousel class name using the metadata syntax. Any Image Overlay option can be overridden using this technique.
...
<div class="carousel { carousel_width : '200px' }">
...
I'm available to customize the jQuery UI Image Carousel to your needs on a freelance basis. If you're interested in my services, please contact me at nealjonv at gmail dot com.
©2009 www.ferretarmy.com