|
|
@@ -27,12 +27,10 @@ $(document).ready(function(){
|
|
|
elt.children('ul.dropdown-menu').stop(true);
|
|
|
}
|
|
|
|
|
|
- $('.dropdown').on('mouseenter', function(e) {
|
|
|
+ $('.dropdown').on('mouseenter tap', function(e) {
|
|
|
|
|
|
- // Special: the dropdown is already displayed, this can
|
|
|
- // happen on mobile or tablet
|
|
|
- if ($(this).hasClass('dropdown-displayed')) {
|
|
|
- hideDropdownsFor($(this));
|
|
|
+ // Special: block this event on mobile and tablet versions
|
|
|
+ if ($('#menu-container .toggle-menu:visible').length > 0) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
@@ -65,6 +63,11 @@ $(document).ready(function(){
|
|
|
}
|
|
|
|
|
|
}).on('mouseleave', function(e) {
|
|
|
+ // Special: block this event on mobile and tablet versions
|
|
|
+ if ($('#menu-container .toggle-menu:visible').length > 0) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
if ($(this).hasClass('delayed-collapsing')) {
|
|
|
hideDropdownsFor($(this), collapsingDelay);
|
|
|
} else {
|
|
|
@@ -93,11 +96,10 @@ $(document).ready(function(){
|
|
|
$('#menu').toggleClass('show-flex');
|
|
|
});
|
|
|
|
|
|
- $('.toggle-dropdown').on('click', function() {
|
|
|
+ $('.toggle-dropdown').on('click', function(e) {
|
|
|
var dropdown = $(this).closest('.dropdown');
|
|
|
var dropdown_menu = dropdown.find('.dropdown-menu').first();
|
|
|
dropdown_menu.toggleClass('show-flex');
|
|
|
-
|
|
|
$(this).toggleClass('fa-plus');
|
|
|
$(this).toggleClass('fa-minus');
|
|
|
});
|