From: zurbchris Date: Sat, 21 Nov 2015 01:24:21 +0000 (-0800) Subject: fixes no hover problem on dropdown menu... I'm gonna rewrite this thing X-Git-Tag: v6.0.3~2^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9fd88396917f42b34ccee1d0902ba9ff35dc5f2b;p=thirdparty%2Ffoundation%2Ffoundation-sites.git fixes no hover problem on dropdown menu... I'm gonna rewrite this thing --- diff --git a/js/foundation.dropdownMenu.js b/js/foundation.dropdownMenu.js index ff412914d..3c1963e3d 100644 --- a/js/foundation.dropdownMenu.js +++ b/js/foundation.dropdownMenu.js @@ -203,22 +203,22 @@ if(!this.options.disableHover){ //add ability for all menu items to close an open menu on the same level// - this.$menuItems.off('mouseenter.zf.dropdownmenu') - .on('mouseenter.zf.dropdownmenu', function(e){ - var $el = $(this); - if(!$el.hasClass('is-active')){ - _this._hideOthers($el); - } - }); - //elements with submenus - $elem.on('mouseenter.zf.dropdownmenu', function(e){ - clearTimeout($elem.closeTimer); - if(!$elem.hasClass('is-active')){ - $elem.openTimer = setTimeout(function(){ - // _this._hideOthers($elem); - _this._show($elem); - }, _this.options.hoverDelay); + this.$menuItems.on('mouseenter.zf.dropdownmenu', function(e){ + var $el = $(this); + if(!$el.hasClass('is-active')){ + _this._hideOthers($el); } + }); + //elements with submenus + $elem.off('mouseenter.zf.dropdownmenu') + .on('mouseenter.zf.dropdownmenu', function(e){ + clearTimeout($elem.closeTimer); + if(!$elem.hasClass('is-active')){ + $elem.openTimer = setTimeout(function(){ + // _this._hideOthers($elem); + _this._show($elem); + }, _this.options.hoverDelay); + } }).on('mouseleave.zf.dropdownmenu', function(e){ if(!$elem.data('isClick') && _this.options.autoclose){ clearTimeout($elem.openTimer);