Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8659715
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T16:04:44+00:00 2026-06-12T16:04:44+00:00

I am facing a rather awkward problem. I register two event handlers, one for

  • 0

I am facing a rather awkward problem. I register two event handlers, one for mouseenter and one for mouseout for the li elements on the page. It has multiple div areas inside it. When I leave the li element it calls the out handler, which is ok. What is not ok is that the out handler is also triggered when I leave a div inside that li.

Below is an image that illustrates it. The blue area is the li element which I register an enter and out event for.
enter image description here

I tried to register handlers on the inner divs that would stop the propagation but it only results in the triggering of the out handler when I enter those inner divs.

Any idea what is going wrong here?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T16:04:45+00:00Added an answer on June 12, 2026 at 4:04 pm

    Use mouseleave instead of mouseout. Mouseout triggers everytime your mouse is going off from exactly atop of the target. So when you enter the divs, your mouse goes out of the li and on the div. But it is still inside the LI of course, using mouseleave will make it work.

    From JQuery doc:

    The mouseleave event differs from mouseout in the way it handles event
    bubbling. If mouseout were used in this example, then when the mouse
    pointer moved out of the Inner element, the handler would be
    triggered. This is usually undesirable behavior. The mouseleave event,
    on the other hand, only triggers its handler when the mouse leaves the
    element it is bound to, not a descendant. So in this example, the
    handler is triggered when the mouse leaves the Outer element, but not
    the Inner element.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am facing a strange problem. My PHP page has following code. echo <div
I am facing a rather odd problem with our groovy build script. The whole
Im facing one problem in streaming data capture for reading the broadcast data during
I am facing a rather peculiar problem. I am working on a compiler for
I'm facing a rather queer problem. I use an Ubuntu(Lucid Lynx-64 bit, to be
I am currently facing a, in my opinion, rather common problem which should be
I am using Symfony 2.0 beta3 and I am facing a rather strange problem.
I am facing a rather odd problem right now. If you fellow this :
Thank you in advance for any responses. I am facing rather a trivial problem.
I am facing a rather strange problem when it comes to orientation change in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.