I found this How can I transition height: 0; to height: auto; using CSS? and I have been trying to use this method to change the height of a div on button onclick but for some reason it is not working for me. Sorry if there is a lot of unnecessary information.
jQuery
function playSound(soundfile){
      document.getElementById("dummy").innerHTML = 
      "<embed src=\""+soundfile+"\" hidden=\"true\" autostart=\"true\" loop=\"false\" />";
}
   $('button').bind('click', function(e) {
         e.preventDefault();
   $('.taller').toggleClass('animated');
   });
HTML
  <div id="container">
     <span id="dummy"></span>
     <button onclick="playSound('sound/button-30.wav','sound/button30.mp3');">PlaySound</button>                         
     <div class="taller">I SHOULD BECOME TALLER</div>
  </div>
CSS
#container{
background-color:lightblue;
width:960px;
height:550px;
}
.taller{
overflow:hidden;
background:#000;
color:#fff;
width:80px;
max-height:15px;
-webkit-transition: max-height .5s linear;
-moz-transition: max-height .5s linear;
transition: max-height .5s linear;
}
.animated{
max-height:100px;
}
 
     
     
    