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
Post a Comment