title: JQuery animation toggle change image
body: <p>I need help,
  I created a script that hides / shows the menu and I added a image (icon/down.png).
  I would like to change the image (down / up) when the movement changes.</p>
  
  <pre><code>   &lt;script type="text/javascript"&gt;
          function showDiv(element){
              $(element).animate({"height": "toggle"}, { duration: 1000 });
          }
     &lt;/script&gt;
          &lt;img src="icon/down.png" width="12" height="12" /&gt;&lt;a href="javascript:showDiv('#menu')"&gt;Menu&lt;/a&gt;
                      &lt;ul id="menu"&gt;
                          &lt;li&gt;&lt;a href="#" target="_blank"&gt;Element A&lt;/a&gt;&lt;/li&gt;
                          &lt;li&gt;&lt;a href="#" target="_blank"&gt;Element A&lt;/a&gt;&lt;/li&gt;
                          &lt;li&gt;&lt;a href="#" target="_blank"&gt;Element A&lt;/a&gt;&lt;/li&gt;
                     &lt;/ul&gt;
  </code></pre>