Search code examples
jquerycsshtmlscaleslide

How could I make a div "slide" to a certain width using jquery?


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.


Solution

  • $('#div').animate({width:500+'px', height:500+'px'});
    

    Replace 500 with your dimensions