• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 834
  • Last Modified:

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

0
adammorland
Asked:
adammorland
1 Solution
 
StealthyDevCommented:
Are you looking for one which is like bouncing-marquee?
0
 
StealthyDevCommented:
You can achieve like this:

setTimeout(function(){$("#pound").slideDown(1500);setTimeout(function(){$("#pound").slideDown(1500);}, 1000);}, 1000);
0
 
kadabaCommented:
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
SteveZzCommented:
setInterval(function(){$("#pound").SlideUp(3500);}, 1000);
The code above should do what you're looking for.
0
 
StealthyDevCommented:
Yes, they are correct, you can achieve it by replacing your setTimeout to setInterval.

Best Regards

0
 
adammorlandAuthor Commented:
perfect! Thank you!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now