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

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

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