Posted By

kbrown on 06/16/11


Tagged

jquery duration cycle


Versions (?)

Jquery Cycle - Set Duration for each Slide


 / Published in: jQuery
 

URL: http://jquery.malsup.com/cycle/timeout2.html

  1. $(function() {
  2. $('#animationBlock').cycle({
  3. delay: -1000,
  4. fx: 'fade',
  5. speed: '1000',
  6. timeoutFn: calculateTimeout
  7. });
  8. });
  9.  
  10. // timeouts per slide (in seconds)
  11. var timeouts = [3, 3, 3, 3, 10];
  12. function calculateTimeout(currElement, nextElement, opts, isForward) {
  13. var index = opts.currSlide;
  14. return timeouts[index] * 1000;
  15. }

Report this snippet  

You need to login to post a comment.