Here you go. Just check the bool checkbox. During the animation, return from the click event, otherwise set the flag and animation, then reset the flag at the end of the animation callback:
$(function () { $('legend').click(function () { if($(this).data('animating') !== true) { $(this).data('animating',true); $(this).parent().find('.content').slideToggle("slow", function(){$(this).data('animating',false);}); } else { return false; } }); });
Alienwebguy
source share