Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

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

Merged
merged 1 commit into from

2 participants

@darronz

Added a stop() to prevent the animation looping.

@nostalgiaz nostalgiaz merged commit 253c954 into nostalgiaz:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 1, 2012
  1. @darronz
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  static/js/jquery.toggle.buttons.js
View
2  static/js/jquery.toggle.buttons.js
@@ -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);
Something went wrong with that request. Please try again.