0

Possible Duplicate:
jQuery Animation - Smooth Size Transition

I have a div with content that changes using .html('some content'). When the content changes, the height of the div either increases or decreases depending on whether the content is getting longer or shorter.

Right now the div resizes immediately. I want to use jQuery to make it resize smoothly, i.e. expand smoothly if the content is taller, or shrink smoothly if the content is shorter.

Thanks!

Community
  • 1
  • 1
user774528
  • 187
  • 3
  • 12
  • You may find the answer you are looking for on this page: http://stackoverflow.com/questions/244758/jquery-animation-smooth-size-transition with the almost exact same question. – Jake Feb 17 '12 at 09:20

2 Answers2

0

http://api.jquery.com/slideToggle/

there's a demo script on the linked page

kinet
  • 1,790
  • 3
  • 20
  • 32
0

jquery animate() function will be helpful for you here is the manual link

Punit
  • 1,110
  • 1
  • 8
  • 14