This problem occurs because each time you click on the button is making the div to animate the height up to 240px. Only after finishing this animation is going to start animating to 0.
There are two solutions: 1. You can check if the panel is closed, and only then animate 2. Force the animation to stop before animate to 0
Example os solution 2:
$('#slide-down').stop().animate({"height": "100px"});