Reputation: 187
I have a div that scales to an image width + height using jquery. I want to know if I can make it "slide" to the width and height.
So instead of just instantly scaling to those dimensions, I want a nice transaction slide.
Upvotes: 2
Views: 1439
Reputation: 368
It depends on how you want to animate it. In addition to .animate, and .show, there is also
$("div").slideUp();
see: http://api.jquery.com/slideUp/
$("div").slideDown("slow");
see: http://api.jquery.com/slideDown/
Upvotes: 0
Reputation: 7942
$('#div').animate({width:500+'px', height:500+'px'});
Replace 500 with your dimensions
Upvotes: 2
Reputation: 64399
You could use "show" ?
$("yourSelector").show("slow");
see: http://api.jquery.com/show/
Upvotes: 0