title: Jquery toggle animation On click
body: <p>I am trying to expand a div on click, and on another click shrink it again. 
  When this function is called, nothing happens.</p>
  
  <p><strong>jQuery Code:</strong></p>
  
  <pre><code>$(".panel").toggle(function()
  {
      $(this).click(function()
      {
          $(this).animate({width:'300px',height:'300px'}, 200);
      });
  },
  function()
  {
      $(this).click(function()
      {
          $(this).animate({width:'152px',height:'152px'}, 200);
      });
  });
  </code></pre>