JQuery slideToggle() clicked multiple times - prevent animation

jquery, jsfiddle, slidetoggle

Solution

Using the jquery `.stop()` api does the trick.

Working example.

Problem

I've searched around for a solution for a while, but can't seem to find it. I thought maybe using JQuery's `.clearQueue()` as in my fiddle, but it doe'snt work. Here's the fiddle. To be clear: I want the sideToggle() to execute, but as soon as it gets clicked again & the first slideToggle() hasn't finished yet, it should stop the animation of the first and slide back up. Using the `.clearQueue()` method it does work for two clicks, but when clicked eg three times, the box dissapears and the heigt is somehow messed up.

Original source