title: Expand/Collapse a div from one height to other height
body: <p>I have a div with style </p>
  
  <pre><code>#thumb {
    position:absolute;
    top:365px;
    left:280px;
    z-index:0;
    width:500px;
    text-align:left;
    height:235px;
    overflow: hidden;
  }
  </code></pre>
  
  <p>Now I am using javascript function to expand and collapse</p>
  
  <pre><code>function toggle_visibility(id) {
     var e = document.getElementById(id);
     var v = document.getElementById("viewall");
     if (e.style.overflow != 'visible')
     {
        v.innerText= "Collapse";
        e.style.overflow = 'visible';
     }
     else
     {
        v.innerText= "Expand";
        e.style.overflow = 'hidden';
     }
  }
  </code></pre>
  
  <p>But I don't want to just overflow it.. I want to increase the height of div when expanding and return back to height 235px when you collapse it.</p>
  
  <p>How can I do that? I am newbie to javascript..Any help will be appreciated</p>