Over a million developers have joined DZone.

Scriptaculous JavaScript Slideshow

DZone's Guide to

Scriptaculous JavaScript Slideshow

Free Resource
Found this amazing code by obie at http://blog.caboo.se/articles/2006/01/19/easy-scriptaculous-slideshow:

var album = { 
  startup: function() { 
    new PeriodicalExecuter(album.cycle, 5) // change image every 5 seconds 
  cycle: function() { 
    new Effect.Fade('image', { // the id of the 
containing the photos duration: 1, fps: 50, afterFinish: function() { new Ajax.Updater('image','/album/next', { // URL for next tag asynchronous: true, onSuccess: function() { new Effect.Appear('image', { duration: 1, fps: 50, queue:'end' }) } }) } }) } } window.onload = album.startup I want to tweak it so that an earlier event precaches the next image instead.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}