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.
<script type="text/javascript">
function showDiv(element){
$(element).animate({"height": "toggle"}, { duration: 1000 });
}
</script>
<img src="icon/down.png" width="12" height="12" /><a href="javascript:showDiv('#menu')">Menu</a>
<ul id="menu">
<li><a href="#" target="_blank">Element A</a></li>
<li><a href="#" target="_blank">Element A</a></li>
<li><a href="#" target="_blank">Element A</a></li>
</ul>
http://jsfiddle.net/J8TfX/2/
Docs for
.prevAll(): http://api.jquery.com/prevall/