JS: Do not apply 'menu-hovered' on #layout

refs #3904
This commit is contained in:
Florian Strohmaier 2019-08-07 13:16:19 +02:00 committed by Johannes Meyer
parent 7864150054
commit 5443bfe9fa
1 changed files with 0 additions and 9 deletions

View File

@ -277,17 +277,12 @@
var $flyout = $target.find('.nav-level-2');
if (! $flyout.length) {
$layout.removeClass('menu-hovered');
$target.siblings().not($target).removeClass('hover');
return;
}
var delay = 300;
if ($layout.hasClass('menu-hovered')) {
delay = 0;
}
setTimeout(function() {
try {
if (! $target.is(':hover')) {
@ -295,7 +290,6 @@
}
} catch(e) { /* Bypass because if IE8 */ }
$layout.addClass('menu-hovered');
$target.siblings().not($target).removeClass('hover');
$target.addClass('hover');
@ -325,8 +319,6 @@
var $hovered = $('#menu').find('.nav-level-1 > .nav-item.hover');
if (! $hovered.length) {
$layout.removeClass('menu-hovered');
return;
}
@ -337,7 +329,6 @@
}
} catch(e) { /* Bypass because if IE8 */ };
$hovered.removeClass('hover');
$layout.removeClass('menu-hovered');
}, 600);
};