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.
- $(document).ready(function() {
- $(".folio_block").each(function() {
-
- //Set Default State of each portfolio piece
- $(this).find(".paging").show();
- $(this).find(".paging a:last").addClass("active");
-
- //Inject <span> for Tool tip
- $(this).find(".image_reel a").append("<span></span>");
- $(this).find(".image_reel span").css({"opacity" : "0"});
-
- //Get size of images, how many there are, then determin the size of the image reel.
- var windowWidth = $(this).find(".image_reel span").width();
- var imageSum = $(this).find(".image_reel img").size();
- var imageReelWidth = windowWidth * imageSum;
-
- //Adjust the image reel to its new size
- $(this).find(".image_reel").css({'width' : imageReelWidth});
-
- });
- //Hover Effect for Tooltip
- $(".image_reel a").hover(function() {
- $(this).find("span").stop().animate({ opacity: 0.2}, 200 ).show();
- }, function() {
- $(this).find("span").stop().animate({ opacity: 0}, 200 );
- });
- //Pagin events
- $(".paging a").click(function() {
-
- var triggerID = $(this).attr("rel") - 1;
- alert (triggerID);
- var imgWidth = $(this).parent().parent().find("img").width();
- var image_reelPosition = triggerID * imgWidth;
-
- //Ignore if Active
- if ( $(this).hasClass("active")) {
- //Do Nothing
- }
- else {
- //Set active paging
- $(this).parent().parent().find(".paging a").removeClass("active");
- $(this).addClass("active");
- //image_reel Image
- $(this).parent().parent().find(".image_reel").animate({
- left: -image_reelPosition
- }, 300 );
- }
- return false;
-
- });
- });