Autoslide

Autoslide

I'm having trouble figuring how to make this slide through automatically. I've been trying to figure out how to include setTimeout and or setInterval but nothing is making sense to me.

  1. $(document).ready(function() {


  2. $(".folio_block").each(function() {
  3. //Set Default State of each portfolio piece
  4. $(this).find(".paging").show();
  5. $(this).find(".paging a:last").addClass("active");
  6. //Inject <span> for Tool tip
  7. $(this).find(".image_reel a").append("<span></span>");
  8. $(this).find(".image_reel span").css({"opacity" : "0"});
  9. //Get size of images, how many there are, then determin the size of the image reel.
  10. var windowWidth = $(this).find(".image_reel span").width();
  11. var imageSum = $(this).find(".image_reel img").size();
  12. var imageReelWidth = windowWidth * imageSum;
  13. //Adjust the image reel to its new size
  14. $(this).find(".image_reel").css({'width' : imageReelWidth});
  15. });

  16. //Hover Effect for Tooltip
  17. $(".image_reel a").hover(function() {
  18. $(this).find("span").stop().animate({ opacity: 0.2}, 200 ).show();
  19. }, function() {
  20. $(this).find("span").stop().animate({ opacity: 0}, 200 );
  21. });

  22. //Pagin events
  23. $(".paging a").click(function() {
  24. var triggerID = $(this).attr("rel") - 1;
  25. alert (triggerID);
  26. var imgWidth = $(this).parent().parent().find("img").width();
  27. var image_reelPosition = triggerID * imgWidth;
  28. //Ignore if Active
  29. if ( $(this).hasClass("active")) { 
  30. //Do Nothing
  31. }
  32. else {
  33. //Set active paging
  34. $(this).parent().parent().find(".paging a").removeClass("active");
  35. $(this).addClass("active");

  36. //image_reel Image
  37. $(this).parent().parent().find(".image_reel").animate({ 
  38. left: -image_reelPosition
  39. }, 300 );
  40. }
  41. return false;
  42. });
  43. });
    • Topic Participants

    • dru6