You'll need the Yahoo UI library, available here. You'll need to load these files: yahoo.js, dom.js, event.js, connection.js (for remote html slides) and animation.js.
You can then simply include the slideshow.js and slideshow.css files available on the download page.
The container of the slideshow is a simple div with the class yui-sldshw-displayer. For some reasons, in the demonstration on the front page I had to specify inline style for the container, like this:
<div id="yui-sldshw-displayer2" class="yui-sldshw-displayer" style="height:300px;width:350px;">
Slides defined in the page are
Remote HTML content is put in a containing div when loaded. Remote images loaded on demand have class applied to them prior to their insertion in the DOM tree.
function(number_of_slides, current_index)
{
return Math.floor( Math.random()*number_of_slides);
} slideshow2 = new YAHOO.myowndb.slideshow("yui-sldshw-displayer2",
{ frames: [ { type: 'remote_html', value: 'http://www.madb.net/slideshow/remoteslide.html', id: "re1"}],
effect: YAHOO.myowndb.slideshow.effects.slideRight
}
);
You can start the looping by calling the loop method, like this:
slideshow2.loop()
YAHOO.myowndb.slideshow.effects.slideUp={
setup: function(frame){
YAHOO.util.Dom.setStyle(frame, 'top', '0');
YAHOO.util.Dom.setStyle(frame, 'left', '0');
},
get_animation: function(frame){
region = YAHOO.util.Dom.getRegion(frame);
return new YAHOO.util.Motion(frame, { points: { by: [0,region.top-region.bottom] } }, 1, YAHOO.util.Easing.easeOut);
}
}