O'Reilly logo

PHP Ajax Cookbook by R. Rajesh Jeba Anbiah, Roshan Bhattarai, Milan Sedliak

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating an image slider

Displaying images in a page as photo albums, features, screenshots, and so on are a common requirement in most websites. Displaying images in a slider with some effects will spice it up and would make the website "Ajaxified". To provide such effects and have a better finish, there are lot of jQuery plugins. In this recipe, we'll see how to display an image slider using the jCarousel plugin.

Getting ready

We'll require the jCarousel plugin from http://sorgalla.com/projects/jcarousel/, along with the jQuery core library.

How to do it...

It is enough to use the normal HTML markup—images in an unordered list—to get a photo listing. In order to hook the jCarousel plugin to the unordered list, we have set the id. To set the theme, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required