0

Here I have a function

function photoLoop() {
fade1L('3000');fade1M('3500');fade1R('4000');show2L('3000');show2M('3500');show2R('4000');
}

When the page loads this function is called <body onload="photoLoop();>

At this point these functions are run until it reaches the end i.e show2R('4000');

My problem is I want it to now go back to fade1L('3000'); and start over.

How can this be done, with out crashing IE?

3 Answers 3

2

Use the jQuery Effects library and make use of the 'callback' functionality

e.g. http://docs.jquery.com/Effects/fadeIn

Sign up to request clarification or add additional context in comments.

Comments

0

Use setTimeout().

You can do

setTimeout(photoLoop, 1000); // call the function after 1 second.

Comments

0

Instead of calling the function directly, do the following which will repeat the function at the specified interval:

setInterval(photoLoop, 1000);

Where 1000 is the interval to repeat the function in milliseconds. You will presumably want to set this to the total duration of these animations (21000ms at a guess).

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.