How to do a for with fades in jquery? -


suppose have div:

<div id="blink">blink</div> 

and want blink 3 times. this ugly code that:

var t = animationtime = 600;  $("#blink").fadeout(t).fadein(t).fadeout(t).fadein(t).fadeout(t).fadein(t); 

but if want blink ten times?

how can loop fades?

thanks in advance.

animation on same element gets added queue, add them in loop! @:)

for (var = 0; < 10; i++){      $("#blink").fadeout(t).fadein(t); } 

jsfiddle: http://jsfiddle.net/trueblueaussie/22bpkhtf/2/


Comments

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - Chrome Extension: Interacting with iframe embedded within popup -