开发者

Animate jQuery effect

开发者 https://www.devze.com 2023-03-19 20:22 出处:网络
I want to design a effect for a div such the effect from this site(from the live comments box, on the right side).

I want to design a effect for a div such the effect from this site(from the live comments box, on the right side).

I am using animate effect. Something like:

jQuery(".aux_content").animate({"width":400+"px"},1000);
jQuery(".aux_content").animate({"height":500+"px"},{duration:1000, queue: true});
jQuery("#scrollingDiv").animate({"height":500+"px"},{duration:1000, queue: true});

It doesn't show how it should. Does anyone ha开发者_如何学JAVAve a better idea?


jQuery(".aux_content").animate({width:"400px",height:"500px"},1000);

Try that instead, keep the number inside the quotes. But the problem is you aren't telling or showing how they ought to look and how they currently are, so it is hard to say completely what you need.

Also, you need to keep the names outside of quotes.

$(".aux_content").animate({width:"400px"},1000, function() {
    $(".aux_content").animate({height:"500px"},1000, function() {
         $("#scrollingDiv").animate({height:"500px"},1000);
    });
});

EDIT: Also, forgot to mention, you can animate more than just one property in the animate string. Showed you how to do it above.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号