I'm looking for a little help with my jQuery fading sequence.
My Code:
$('#1').fadeOut('fast');
$('#1same').fadeOut('fast');
$('#fadeinme').fadeIn('slow');
I'm looking to add a 1 second delay a开发者_Python百科fter the first 2 (#1 & #1same fade out at the same time) before the 3rd fades in.
Thanks!
We can use the completed callback to execute the fadeIn after the first animation has completed, then use .delay to add the one second delay:
$('#1, #1same').fadeOut('fast', function(){
$('#fadeinme').delay(1000).fadeIn('slow');
});
Do note that in HTML4, ids cannot start with a number.
加载中,请稍侯......
精彩评论