]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Remove duplicated event docs in ResponsiveToggle 9563/head
authorNicolas Coden <nicolas@ncoden.fr>
Sat, 24 Dec 2016 00:36:49 +0000 (01:36 +0100)
committerNicolas Coden <nicolas@ncoden.fr>
Sat, 24 Dec 2016 00:36:49 +0000 (01:36 +0100)
js/foundation.responsiveToggle.js

index 6147c2675d59d0c4b485b45c05a9152f644eab07..136f857d338bd4d7232cfd089203e4fe5396f311 100644 (file)
@@ -93,23 +93,19 @@ class ResponsiveToggle {
    */
   toggleMenu() {
     if (!Foundation.MediaQuery.atLeast(this.options.hideFor)) {
+      /**
+       * Fires when the element attached to the tab bar toggles.
+       * @event ResponsiveToggle#toggled
+       */
       if(this.options.animate) {
         if (this.$targetMenu.is(':hidden')) {
           Foundation.Motion.animateIn(this.$targetMenu, this.animationIn, () => {
-            /**
-             * Fires when the element attached to the tab bar toggles.
-             * @event ResponsiveToggle#toggled
-             */
             this.$element.trigger('toggled.zf.responsiveToggle');
             this.$targetMenu.find('[data-mutate]').triggerHandler('mutateme.zf.trigger');
           });
         }
         else {
           Foundation.Motion.animateOut(this.$targetMenu, this.animationOut, () => {
-            /**
-             * Fires when the element attached to the tab bar toggles.
-             * @event ResponsiveToggle#toggled
-             */
             this.$element.trigger('toggled.zf.responsiveToggle');
           });
         }
@@ -117,11 +113,6 @@ class ResponsiveToggle {
       else {
         this.$targetMenu.toggle(0);
         this.$targetMenu.find('[data-mutate]').trigger('mutateme.zf.trigger');
-
-        /**
-         * Fires when the element attached to the tab bar toggles.
-         * @event ResponsiveToggle#toggled
-         */
         this.$element.trigger('toggled.zf.responsiveToggle');
       }
     }