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. if false, 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}); });รข€‹ 

js fiddle demo.

references:


Comments

Popular posts from this blog

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

php - Get uncommon values from two or more arrays -

Adding duplicate array rows in Php -