Coder Social home page Coder Social logo

auto-hide for hover about jquery-contextmenu HOT 5 CLOSED

swisnl avatar swisnl commented on May 24, 2024
auto-hide for hover

from jquery-contextmenu.

Comments (5)

rodneyrehm avatar rodneyrehm commented on May 24, 2024

I'm not sure I understand what you want exactly. How should this auto-hide behave?

from jquery-contextmenu.

devangnegandhi avatar devangnegandhi commented on May 24, 2024

what happens right now is when we mover over a div on which we want the context menu to appear on hover, the menu appears nicely. but, once we leave this area, the menu still stays there. It would have been nice if there was an option that would allow me to specify that a context menu should disappear once we moved out of that area. does this make sense?

from jquery-contextmenu.

rodneyrehm avatar rodneyrehm commented on May 24, 2024

Well, yes, sort of.

Until I figure out how to do this properly, you could use the show event to register an mouseleave listener on your div. if triggered, and the relatedTarget is not the menu, send a hide event. (on hide event, unregister the listener…)

from jquery-contextmenu.

devangnegandhi avatar devangnegandhi commented on May 24, 2024

ok thanks a lot.

from jquery-contextmenu.

rodneyrehm avatar rodneyrehm commented on May 24, 2024

The solution is a bit hacky, as the mouse pointer position has to be compared to the position of the trigger element… but hey… it seems to work fine here.

from jquery-contextmenu.

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.