]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Move feather inside of init for accordion, drilldown, and dropdown menus 10439/head
authorKevin Ball <kmball11@gmail.com>
Wed, 19 Jul 2017 22:45:56 +0000 (15:45 -0700)
committerKevin Ball <kmball11@gmail.com>
Wed, 19 Jul 2017 22:45:56 +0000 (15:45 -0700)
js/foundation.accordionMenu.js
js/foundation.drilldown.js
js/foundation.dropdownMenu.js

index 17ec7ebe9d8600e8404e5fd1c3cf53c99f06d242..53d11ffd18830d44a8f5834e73f6ad49342788f1 100644 (file)
@@ -28,8 +28,6 @@ class AccordionMenu extends Plugin {
     this.options = $.extend({}, AccordionMenu.defaults, this.$element.data(), options);
     this.className = 'AccordionMenu'; // ie9 back compat
 
-    Nest.Feather(this.$element, 'accordion');
-
     this._init();
 
     Keyboard.register('AccordionMenu', {
@@ -50,6 +48,8 @@ class AccordionMenu extends Plugin {
    * @private
    */
   _init() {
+    Nest.Feather(this.$element, 'accordion');
+
     var _this = this;
 
     this.$element.find('[data-submenu]').not('.is-active').slideUp(0);//.find('a').css('padding-left', '1rem');
index 48e86b0ef37674944ff23ce8753f25e92e12bf5c..ed38f42a7c928ff80e0280ca657ef80925f7fd48 100644 (file)
@@ -28,8 +28,6 @@ class Drilldown extends Plugin {
     this.options = $.extend({}, Drilldown.defaults, this.$element.data(), options);
     this.className = 'Drilldown'; // ie9 back compat
 
-    Nest.Feather(this.$element, 'drilldown');
-
     this._init();
 
     Keyboard.register('Drilldown', {
@@ -50,6 +48,8 @@ class Drilldown extends Plugin {
    * @private
    */
   _init() {
+    Nest.Feather(this.$element, 'drilldown');
+
     if(this.options.autoApplyClass) {
       this.$element.addClass('drilldown');
     }
index 5e2c6974cc1dda227de6d2697e1cebde14db7465..e91a0dbb48f9711319a2ff5547e407d066b0125f 100644 (file)
@@ -30,7 +30,6 @@ class DropdownMenu extends Plugin {
     this.options = $.extend({}, DropdownMenu.defaults, this.$element.data(), options);
     this.className = 'DropdownMenu'; // ie9 back compat
 
-    Nest.Feather(this.$element, 'dropdown');
     this._init();
 
     Keyboard.register('DropdownMenu', {
@@ -50,6 +49,8 @@ class DropdownMenu extends Plugin {
    * @function
    */
   _init() {
+    Nest.Feather(this.$element, 'dropdown');
+
     var subs = this.$element.find('li.is-dropdown-submenu-parent');
     this.$element.children('.is-dropdown-submenu-parent').children('.is-dropdown-submenu').addClass('first-sub');