]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
fix: clear the animation queue - closes #10486 11859/head
authorDaniel Ruf <daniel@daniel-ruf.de>
Mon, 14 Oct 2019 21:39:44 +0000 (23:39 +0200)
committerDaniel Ruf <daniel@daniel-ruf.de>
Mon, 14 Oct 2019 21:39:44 +0000 (23:39 +0200)
js/foundation.accordion.js

index e2f9116f068412a23a6da2b2aba28aef955a1dd4..6d88069b49c53a8f6972962e24b8ee3e586ade0f 100644 (file)
@@ -44,7 +44,7 @@ class Accordion extends Plugin {
 
     this.$element.attr('role', 'tablist');
     this.$tabs = this.$element.children('[data-accordion-item]');
-    
+
     this.$tabs.attr({'role': 'presentation'});
 
     this.$tabs.each(function(idx, el) {
@@ -274,7 +274,7 @@ class Accordion extends Plugin {
       'aria-selected': true
     });
 
-    $target.slideDown(this.options.slideSpeed, () => {
+    $target.stop().slideDown(this.options.slideSpeed, () => {
       /**
        * Fires when the tab is done opening.
        * @event Accordion#down
@@ -302,7 +302,7 @@ class Accordion extends Plugin {
      'aria-selected': false
     });
 
-    $target.slideUp(this.options.slideSpeed, () => {
+    $target.stop().slideUp(this.options.slideSpeed, () => {
       /**
        * Fires when the tab is done collapsing up.
        * @event Accordion#up