I have a toggle fade effect but when you click the button multiple times it fades in and out more than once. (So if i click the fade id 20 times fast it will fade in and out multiple times) How would I stop this and make it so that you can only toggle the fade when the animation was done? I tried getting the current value and making a if statement but it didn't work :*(
Thanks
jQuery.fn.fadeToggle = function(speed, easing, callback) {
return this.animate({opacity: 'toggle'}, speed, easing, callback);
};
$(document).ready(function() {
$('.open').click(function() {
$('#fadeMe').next().fadeToggle('slow');
});
});