Comments (2)
Hi, I solved it as followed:
when exiting the menu I start a timeout on a function that will trigger a mouseleave event on this menu. This happens when tout is null. When entering any row I stop the deactivate the timeout => Submenu is still displayed. When I really leave the menu, then after 1200ms the mouseleave event is triggert on the menu. As tout is now set (it has some number, hence is true) the exitMenu method returns true and the menu will be closed.
Hope that helps. I needed myself some time to figure out that solution.
// [ … ]
function deactivateMenu(menuobj,menu) {
$(menu).trigger('mouseleave');
}
// menu hide timeout
var tout;
$('#catNavL1').menuAim({
activate: activateSubMenu,
deactivate: deactivateSubMenu,
exitMenu: function(menu) {
var $this = this;
if ( ! tout ) {
tout = setTimeout(function () {
deactivateMenu($this,menu);
}, 1200);
return false;
}
return true;
},
enter: function(row) {
/* stop timeout */
window.clearTimeout(tout);
tout = null;
var
$submenu = $row.find('ul:first');
},
submenuDirection: "below"
});
from jquery-menu-aim.
This solution is not working
from jquery-menu-aim.
Related Issues (20)
- Nested Menu with Menu-aim HOT 4
- if Submenu is active
- Bootstrap columns / rows HOT 1
- Menu aim can not show sub menu on Firefox HOT 2
- Publish to NPM? HOT 1
- Does a non-jquery version exist? HOT 2
- Delayed submenu on hover HOT 2
- Compatibility issue with displaing menu with jquery.stickyNavbar
- jQuery-menu-aim with Jquery Vertical UI tabs HOT 1
- Responsive dropdowns
- There is no git tags on GitHub repository
- how to keep the container fixed?
- Describe the tolerance option in the documentation
- Re-Hover doesn't work with 'bottom' settings (in Shopware) HOT 15
- submenuSelector not working
- Example for horizontal menus? HOT 2
- Prevent event bubbling ?
- Navigating through keyboard
- Wordpress plugin?
- Consider rewriting this plugin as a hook/component for react?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jquery-menu-aim.