Code Monkey home page Code Monkey logo

Comments (2)

beipawel avatar beipawel commented on May 22, 2024

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 $row = $(row),
$submenu = $row.find('ul:first');
},
submenuDirection: "below"
});

from jquery-menu-aim.

infabo avatar infabo commented on May 22, 2024

This solution is not working

from jquery-menu-aim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.