Hello,

  At yesterday's Vancouver Ajax Hack Night inspired by Karl Swedberg's
Scroll Up Headline Reader jQuery Tutorial [1] I put together an
autoplay addon (Beta version) for the S6 slide show package.

  Using jQuery's animate[2] function lets you loop through slides in
autoplay with a scroll-up effect and more. It's as easy as replacing:

  $( cid ).hide(); // hide current slide
  $( nid ).show(); // show next slide

  with:

  var cheight = $( cid ).outerHeight();
  $( cid ).animate({top: -(cheight+5)},"slow");
  $( nid ).css('top',(cheight+5)+'px');
  $( nid ).show();
  $( nid ).animate({top: 0},"slow", function() { $
( cid ).hide().css( 'top', '0px'); } );

  See an example slide show in action @ 
http://slideshow.rubyforge.org/autoplay.html

  Note, you can use the 'a', 's' or 'p' keys to start/stop the
autoplay. Cheers.


[1] http://docs.jquery.com/Tutorials:Scroll_Up_Headline_Reader
[2] http://docs.jquery.com/Effects/animate

--
Gerald Bauer - Internet Professional - http://geraldbauer.ca

Reply via email to