jquery delay() doesn't delay attr() in the queue

Posted by luca on Stack Overflow See other posts from Stack Overflow or by luca
Published on 2010-05-10T23:28:40Z Indexed on 2010/05/10 23:34 UTC
Read the original article Hit count: 484

Filed under:
|
|

hi, what is wrong in this code? I'm trying to get this effect: fadeOut(500) and attr('class','myClass') delayed by 600 millisecs.. then delay(600) again, and fadeIn(500). The delays happen correctly but the attr() is not being delayed, it fires when #myDiv is still fading! :'(

$('#myDiv').fadeOut(500).delay(600).attr('class','myClass').delay(600).fadeIn(500);  

many thanks in advance for any suggestions! Luca

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about delay