JQuery delay several divs -


i have following code: http://jsfiddle.net/s5xlm/

with 2 delays , settimeout(function (){ }

the first delay working, second won't work.

the current object shown gray box. next object (a blue box) should shown after delay. , after delay, green box should shown.

so instead of (like now): gray -delay-> blue

i want: gray -delay-> blue -delay-> green.

thanks.

a slight modification fiddle desired effect.

$('#object1').click(function () {     settimeout(function() {         $('#object1').hide();         $('#object2').show();                  settimeout(function() {             $('#object2').hide();             $('#object3').show();         }, 1000)     }, 1000); }); 

Comments

Popular posts from this blog

javascript - How to name a jQuery function to make a browser's back button work? -

python - Django-easy-pdf: xhtml2pdf reporting reportlab 2.2+ is required, but 3.0 installed -

collision detection - C++ library for mesh to mesh intersection: what is available? -