]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Don't close others if the new dropdown is_hover:false. This way if we move the mouse... 4001/head
authornesl247 <harrison@theheck.me>
Fri, 3 Jan 2014 16:19:36 +0000 (16:19 +0000)
committernesl247 <harrison@theheck.me>
Fri, 3 Jan 2014 16:19:36 +0000 (16:19 +0000)
js/foundation/foundation.dropdown.js

index ad23f47d3c7012141f1ed7689b1722ce4748edbb..51f6b689aa491bebe4af207b887d3c9f2f717c39 100644 (file)
           var $this = $(this);
           clearTimeout(self.timeout);
 
-          if($(e.target).data('dropdown')) {
-            self.closeall.call(self);
-          }
-
           if ($this.data('dropdown')) {
             var dropdown = $('#' + $this.data('dropdown')),
                 target = $this;
           }
 
           var settings = target.data('dropdown-init') || self.settings;
+          
+          if($(e.target).data('dropdown') && settings.is_hover) {
+            self.closeall.call(self);
+          }
+          
           if (settings.is_hover) self.open.apply(self, [dropdown, target]);
         })
         .on('mouseleave.fndtn.dropdown', '[data-dropdown], [data-dropdown-content]', function (e) {