Posted By

ryarwood on 06/09/11


Tagged

jquery cycle onAfter


Versions (?)

jQuery cycle with onAfter example


 / Published in: JavaScript
 

URL: http://www.todaymarinadelrey.com

  1. function onAfter() {
  2. if (this.id == "time1") {
  3. $("body").css("background", "url(http://www.todaymarinadelrey.com/images/bg1.jpg)");
  4. $("body").css("background-attachment", "fixed");
  5. $("body").css("background-position", "center center");
  6. }
  7. if (this.id == "time6") {
  8. $("body").css("background", "url(http://www.todaymarinadelrey.com/images/bg2.jpg)");
  9. $("body").css("background-attachment", "fixed");
  10. $("body").css("background-position", "center center");
  11. }
  12. $('#timeline').css("background-image", "url(http://www.todaymarinadelrey.com/images/" + this.id + ".png)");
  13. }
  14.  
  15. $('#timePhoto').cycle({
  16. fx: 'scrollLeft',
  17. speed: 1000,
  18. timeout: 5000,
  19. after: onAfter
  20. });

Report this snippet  

You need to login to post a comment.