change a div height with smooth effect
Hello,
I have to change a div height, when I click a button. At the moment, I use this code :
- $('#map-trigger').click(function() {
- if( $('#map-container').hasClass('closed') ) {
- $('#map-container').css('height', '581px');
- }
- else {
- $('#map-container').css('height', '294px');
- }
- });
This works. But the height is "instantly" updated. I'd like this effect to be smoother : The height should "slide" from 294px to 581px. Is that possible ?