Link to home
Start Free TrialLog in
Avatar of adammorland
adammorlandFlag for United Kingdom of Great Britain and Northern Ireland

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);

	});
}

Open in new window

Avatar of StealthyDev
StealthyDev

Are you looking for one which is like bouncing-marquee?
You can achieve like this:

setTimeout(function(){$("#pound").slideDown(1500);setTimeout(function(){$("#pound").slideDown(1500);}, 1000);}, 1000);
ASKER CERTIFIED SOLUTION
Avatar of SteveZz
SteveZz
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Yes, they are correct, you can achieve it by replacing your setTimeout to setInterval.

Best Regards

Avatar of adammorland

ASKER

perfect! Thank you!