javascript - jQuery slowly fade in and out, pause, and then repeat -


i have 4 images in list fade out, in, move on next, , repeat until comes time. need use code, have pause until other 3 complete, again.

how can go doing that?

$('#image1').animate({ opacity: 1/3 }, 500); $('#image1').animate({ opacity: 1 }, 1000); $('#image2').animate({ opacity: 1/3 }, 2000); $('#image2').animate({ opacity: 1 }, 2500); $('#image3').animate({ opacity: 1/3 }, 3500); $('#image3').animate({ opacity: 1 }, 4000); $('#image4').animate({ opacity: 1/3 }, 5000); $('#image4').animate({ opacity: 1 }, 5500); 

how loop it? best way it?

see http://jsfiddle.net/8uysuv3q/

$(".fade").each(function(index) {     $(this).delay(800*index).fadeto(200, 0.5).fadeto(200, 1).fadeto(200, 0.5).fadeto(200, 1); }); 

Comments

Popular posts from this blog

Email notification in google apps script -

c++ - Difference between pre and post decrement in recursive function argument -

javascript - IE11 incompatibility with jQuery's 'readonly'? -