adammorland
asked on
How can I get a jQuery function to continuously repeat?
I have the following code which works perfectly, but what I would like it to do is keep repeating the transitions infinitely. How can I do this?
function home_text_c() {
$(document).ready(function() {
setTimeout(function(){$("#pound").slideDown(1500);}, 1000);
setTimeout(function(){$("#poundreflection").animate({ height:"76px" }, 1500);}, 1000);
setTimeout(function(){$("#pound").SlideUp(3500);}, 1000);
setTimeout(function(){$("#poundreflection").animate({ height:"0px" }, 3500);}, 1000);
});
}
Are you looking for one which is like bouncing-marquee?
You can achieve like this:
setTimeout(function(){$("# pound").sl ideDown(15 00);setTim eout(funct ion(){$("# pound").sl ideDown(15 00);}, 1000);}, 1000);
setTimeout(function(){$("#
you need to use the setInterval to do this....
http://www.elated.com/articles/javascript-timers-with-settimeout-and-setinterval/
http://www.elated.com/articles/javascript-timers-with-settimeout-and-setinterval/
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Yes, they are correct, you can achieve it by replacing your setTimeout to setInterval.
Best Regards
Best Regards
ASKER
perfect! Thank you!