February 4, 201016 yr Hey guys, I've got the following code, but I'm not sure how to make it loop? Any help would be much appreciated. jQuery(function($) { var timer; function Cloud(event) { $("#cloud").css("opacity","0"); $("#cloud").css("left","-600px"); $("#cloud").animate({"opacity":1,"left":1600},20000, "linear", null); $("#cloud").css("left","1024px"); $("#cloud").animate({"left":-600},20000, "linear", null); } Cloud(); }); It's basically a cloud, comes in from the left to right, opacity turns up, then I've made it move back. Which is great, But I could do with it looping, rather than me making it move say 10 times. Cheers, Chris
Create an account or sign in to comment