From the course: View Source

Unlock this course with a free trial

Join today to access over 22,400 courses taught by industry experts.

004 Creating a photo rotator with jQuery Cycle

004 Creating a photo rotator with jQuery Cycle

From the course: View Source

004 Creating a photo rotator with jQuery Cycle

Hello! This is Ray Villalobos and welcome to View Source! In this episode we're going to build an image fader with one my favorite jQuery plug-ins jQuery Cycle. So if you're ready to stop, slide, and roll with a bit of JavaScript, then it's time to View Source. So jQuery is a JavaScript library that makes it easy to select things like you would with CSS and add animation and other methods to them. One of the beautiful things about jQuery is its ability to be extended via the use of plug-ins, and when it comes to building image rotators or sliders, I really like a project called jQuery Cycle. A lot of plug-ins require you to issue complex commands or follow strict formatting rules for organizing your code. JQuery Cycle shines above the rest, because it's super-easy to setup. So the first thing you're going to need is a simple page structure with a series of images that have been sized to the same proportions. I am using a div class right here to make sure that I can target these things…

Contents