Fix for looping animation if element is clicked multiple times #23

Merged
merged 1 commit into from Oct 1, 2012
Jump to file or symbol
Failed to load files and symbols.
+1 −1
Split
@@ -136,7 +136,7 @@
e.preventDefault();
e.stopImmediatePropagation();
- $element.animate({'left': active ? '0' : '-50%'}, $toggleButton.data('transitionSpeed'));
+ $element.stop().animate({'left': active ? '0' : '-50%'}, $toggleButton.data('transitionSpeed'));
options = $toggleButton.data('options');
options.onChange($element, active, e);