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

Rotating content

Scrolling content with effects in the iPhone and Mac OS is very attractive. In Web 2.0 sites, too, we sometimes require to fly or scroll the contents. That content rotation is usually needed for news tickers, announcement scrollers, stylish effects to present content like slideshows, and so on. The jQuery ecosystem has lot of plugins for that purpose. However, the jQuery.scrollTo plugin is relatively simple, provides lot of effects, and can therefore effectively be used in many situations.

Getting ready

Along with the jQuery core library, we'll require the jQuery.scrollTo plugin from http://plugins.jquery.com/project/ScrollTo.

How to do it...

Here, we'll see how to scroll the content of the div container dynamically, using JavaScript. ...

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