Here's the fiddle:
Rapidly clicking the button will cause the animation to pause halfway. I suspect it's the stop() function's problem but I can't find a way to fix it. By the way, I use stop to prevent jQuery from putting all the sliding animations in the queue.
toggle()
is deprecated you can try slideToggle()
:
$('a').click(function(e) {
e.preventDefault();
$('div').stop(true,true).slideToggle()
})