]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Added showAll using down() for all elements. 8743/head
authorMarius Olbertz <marius.olbertz@gmail.com>
Thu, 5 May 2016 18:07:13 +0000 (20:07 +0200)
committerMarius Olbertz <marius.olbertz@gmail.com>
Thu, 5 May 2016 18:07:13 +0000 (20:07 +0200)
Rewrote hideAll to use up() for all elements.

Like in #8460 purposed by @crbranch the hideAll method should use the up() method.
Also showAll() could be useful.

js/foundation.accordionMenu.js

index 212e4584f2e82821f2a694aec5e07f0dbf151a11..55f7e83f3cddd01e6a9067dd277cf591a09506de 100644 (file)
@@ -173,7 +173,15 @@ class AccordionMenu {
    * @function
    */
   hideAll() {
-    this.$element.find('[data-submenu]').slideUp(this.options.slideSpeed);
+    this.up(this.$element.find('[data-submenu]'));
+  }
+
+  /**
+   * Opens all panes of the menu.
+   * @function
+   */
+  showAll() {
+    this.down(this.$element.find('[data-submenu]'));
   }
 
   /**