Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Need help fading in and out with images. Here what i have. Need to be in a infin

ID: 3551846 • Letter: N

Question

Need help fading in and out with images. Here what i have. Need to be in a infinite loop the fade and in out should last approximately 5 seconds . I have the pictures starting in div1. Thanks


//Global variables for cyclePics

var pics = new Array(6);

pics[0] = "images/homepage/0.png";

pics[1] = "images/homepage/1.png";

pics[2] = "images/homepage/2.png";

pics[3] = "images/homepage/3.png";

pics[4] = "images/homepage/4.png";

pics[5] = "images/homepage/5.png";

pics[6] = "images/homepage/6.png";

pics[7] = "images/homepage/7.png";

pics[8] = "images/homepage/8.png";

pics[9] = "images/homepage/9.png";

var picId;

var fadeOut_opacity=1;

var fadeIn_opacity =0;

var delta = 0.001;

var nextPic;

Explanation / Answer

Simply don't call the next fading in the callback but call it immediately visiblePanel.fadeOut(FU.featureTiming.transition); visiblePanel.next().fadeIn(FU.featureTiming.transition, function(){ visiblePanel.next().find('img').removeClass('displayNone') });

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote