Reputation: 1049
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 have a better idea?
Upvotes: 0
Views: 157
Reputation: 469
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.
Upvotes: 1