Reputation: 5025
$(this).animate({'backgroundColor':'red'},600)
.animate({'color':'#fff'},600);
How can I make both .animate
events happen at the same time instead of the second one waiting for the first one to complete?
Upvotes: 1
Views: 53
Reputation: 2915
You should be able to specify multiple things that change in your animate statement.
$(this).animate({
'backgroundColor':'red',
'color':'#fff'
} ,600);
It's right there in the documentation for .animate()
.
Upvotes: 0
Reputation: 129792
By specifying them in the same animate
call:
$(this).animate({
'backgroundColor':'red',
'color':'#fff'
},600);
Upvotes: 2