3
Try with the Animate like this
$('#seuBotao').on('click', function(){
if($('.sua-div').height() == 30){
$('.sua-div').animate({"height" : "200px"}, 200);
}else{
$('.sua-div').animate({"height" : "30px"}, 200);
}
});
Where 200 would be the time in milliseconds for animation; You can also create by adding classes:
$('#seuBotao').on('click', function(){
if($('.sua-div').hasClass('pequena')){
$('.sua-div').animate({"height" : "200px"}, 200);
$('.sua-div').removeClass('pequena');
$(this).attr('value', 'Diminuir');
}else{
$('.sua-div').animate({"height" : "30px"}, 200);
$('.sua-div').addClass('pequena');
$(this).attr('value', 'Aumentar');
}
});
How-to nay ask questions.
– Renan Gomes