Skip Navigation Services Work Apps Blog Contact

YUI Slideshow (Version 1.0): Basic Usage

You are viewing the guide for an outdated version of this module. For the latest version, see YUI Slideshow

Step 1: Include the YUI3 script file:

(as of this writing, the latest release is 3.0.0)

<script src="http://yui.yahooapis.com/3.0.0/build/yui/yui-min.js" type="text/javascript"></script>

Step 2: Create a YUI instance and use the config object to add the YUI Slideshow module:

<script type="text/javascript">
YUI({
	modules: {
		'gallery-yui-slideshow': {
			fullpath: 'http://yui.yahooapis.com/gallery-2010.03.23-17-54/build/gallery-yui-slideshow/gallery-yui-slideshow-min.js',
			requires: ['anim'],
			optional: [],
			supersedes: []
		}
	}
}).use('gallery-yui-slideshow', function(Y) {

	// Your code here.

});
</script>

Step 3: Pass an ID or HTML element to the Y.Slideshow() constructor:

You can also pass an array of IDs or HTML elements. IDs can be in selector format (eg. ‘#someID’) or simply an ID string.

	var oSlideshow = new Y.Slideshow('someID');

Example:


CavePlanetSunset

Download
Demo
Basic Usage
Intermediate Usage
Advanced Usage