jquery - Animation delay for this snippet? -
i read on jquery delaying, can't seem delay animation 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 doing wrong here?
the problem queue: false
boolean, has effect of starting animation (from api page animate()
):
queue
: boolean indicating whether place animation in effects queue. iffalse
, animation begin immediately.
removing that, , combining effects 1 animate()
call seems make things work expected:
$("div#test").mouseover(function () { $(this) .delay(1000) .animate({width:100, height: 100}); });รข
references:
Comments
Post a Comment