Expand DIV view on toggle

Expand DIV view on toggle

I have a simple toggle script which will expand /hide a menu.

How can I expand the height of the parent container if I toggle off the view of my menu?

  1. <script>
  2. $(document).ready(function(){
  3. $( "#route_btn" ).click(function() {
  4.  $( "#silver1" ).toggle( "slow", function() {
  5. // Animation complete.
  6.  });
  7. });
  8. });
  9. </script>