Rate this script:  I Love it  /   I Hate it

Scriptaculous JavaScript slideshow


Code

var album = {
  startup: function() {
    new PeriodicalExecuter(album.cycle, 5) // change image every 5 seconds
  },
  cycle: function() {
    new Effect.Fade('image', { // the id of the <DIV> containing the photos
      duration: 1,
      fps: 50,
      afterFinish: function() {
        new Ajax.Updater('image','/album/next', { // URL for next <IMG> tag
          asynchronous: true,
          onSuccess: function() {
            new Effect.Appear('image', {
              duration: 1,
              fps: 50,
              queue:'end'
            })
          }
        })
      }
    })
  }
}
 
window.onload = album.startup

 

 
Scriptaculous JavaScript slideshow scripts | Scriptaculous JavaScript slideshow snippet | Scriptaculous JavaScript slideshow example | Scriptaculous JavaScript slideshow tutorial | Scriptaculous JavaScript slideshow code