Yahoo! recommends YUI 3. Learn about YUI 3 on YUILibrary.com.
This example uses the YUI Carousel Control to showcase how to customize and display pagination information.
Here we will use the YUI Carousel Control's private pagination configuration
setting to display customized pagination information.
This example has the following dependencies:
This example uses progressive enhancement; the Carousel is built from an existing ordered list.
Make sure all carousel items have a width and height.
After Carousel instantiation, we use the public registerPagination method to register a text and/or HTML
template containing any one of the following Carousel tokens: numVisible, numPages,
numItems, selectedItem, currentPage, firstVisible, and/or
lastVisible. Carousel's public updatePagination is then called automatically and substitutes each
token with its respective data. The method continues to be called every time Carousel's state changes.
You can load the necessary JavaScript and CSS for this example from Yahoo's servers. Click here to load the YUI Dependency Configurator with all of this example's dependencies preconfigured.
Note: Logging and debugging is currently turned off for this example.
All YUI 2.x users should review the YUI 2.8.2 security bulletin, which discusses a vulnerability present in YUI 2.4.0-2.8.1.

Copyright © 2012 Yahoo! Inc. All rights reserved.