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

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -