jQuery Slideshow with the jQuery Cycle Plugin
Written by Joe on Wednesday, May 19, 2010
Some of the most popular jquery scripts are slideshow/photo gallery scripts, and there are tons of them out there. This article is about one of my personal favorites, the jQuery cycle plugin. The jQuery cycle plugin provides many different type of transitional effects as well as support for pause-on-hover, auto-stop, auto-fit, before/after callbacks, click triggers and much more.
Getting Started With The jQuery Cycle Plugin
First, you are going to need a copy of the jQuery library. You can download the jQuery library for free at http://www.jquery.com/. You are also going to need a copy of the jQuery cycle plugin which you can download free at http://www.malsup.com/jquery/cycle/. After you download both, copy the files to your web server and you are ready to get started.
After you have included your scripts in the <head></head> section of your code, you can started using the plugin. As always, a jQuery block starts with:
$(document).ready(function() {
// your jQuery code goes here
});
The jQuery cycle plugin is very simple to implement. You simply include all of your images inside a div with an id or class. Then you call the cycle plugin to cycle through the items in that div, choose what effect you would like to use and you are done!
The jQuery
$(document).ready(function() {
$('.slideshow').cycle({
fx: 'fade' // your transition type, ex: fade, scrollUp, shuffle, etc...
});
});
The HTML
<div class="slideshow">
<img src="images/img1.jpg" width="200" height="200" />
<img src="images/img2.jpg" width="200" height="200" />
<img src="images/img3.jpg" width="200" height="200" />
</div>
This example is very basic. It is very easy to create custom slideshows with text, next/previous buttons, etc.. Want a slideshow on your site, quick and accessible without the cost and time needed to make a flash slideshow? We can help. Contact us and let us know about your slideshow project.
Like what you’ve read?
Link back to us.
http://www.revolutionunlimited.com/news-and-articles/javascript-jquery/2010-05-19/jquery-slideshow-with-the-jquery-cycle-plugin/
OR Join Our Mailing List
Pulling your hair out over your website?Contact us today to get a professional website at a great price. Contact Us Today |
![]() |
News And Articles
Get A Free Quote
Looking For Something?
Text and image updates on your website don't to break the bank. Our custom content management system gives you control of your website. Contact us to learn more about our custom content management system.
Testimonials
I'm liking how easy this is...I've never had a web site project go so smoothly. Thank you for that and I do look forward to a long... Read More »
Wow! The website looks Great! Thanks Joe. I'm very happy with Revolution Unlimited & I am going to recommend you to all of my friends !... Read More »
It is my pleasure to recommend Mr. Joe Brown whose native intelligence for web designing is great. Joe's dedication to the A... Read More »
We at The Ale House Tavern & Tap, based out of Sayreville, are very pleased with the work that PixelProgression and Revolution Unlimited put... Read More »
I had the great fortune of connecting with PixelProgression and Revolution Unlimited when I decided there was need for a new website. This website... Read More »
As a nonprofit organization, we needed the assistance of a website designer who was knowledgeable, affordable, easily accessible, patient and,... Read More »
Pennsylvania Dutch Design would like to commend Jason of Pixel Progression and Joe of Revolution Unlimited. With their extensive knowledge... Read More »






Post A Comment