Sprite

A basic CSS sprite: shows a single image at a time from a strip of images.
Live demo
var $sprite = Sprite.create({
X
Click one:
Selected:

Class relationships

This shows the control's base classes (in black), other classes used by the control, and any subclasses.

Class members

cellHeight
The height of a single cell in the sprite image, in pixels.
currentCell
The sprite cell currently shown.
image
The sprite image.

Notes

View the full source for Sprite on GitHub.