I read up on jQuery delaying, but I can’t seem to delay my animation for this mouseover call:
$("div#test").mouseover(function ()
{
$("div#test").delay(1000).animate({width:100}, {queue:false});
$("div#test").delay(1000).animate({height:100}, {queue:false});
});
What am I doing wrong here?
The problem is the
queue: falseboolean, which has the effect of starting the animation immediately (from the API page foranimate()):Removing that, and combining effects into one
animate()call seems to make things work as expected:JS Fiddle demo.
References:
animate().delay().