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

  • Home
  • SEARCH
  • 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 672283
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T00:28:04+00:00 2026-05-14T00:28:04+00:00

Ive got the following html setup: <div id=div1> <div id=content1>blaat</div> <div id=content1>blaat2</div> </div> it

  • 0

Ive got the following html setup:

<div id="div1">
<div id="content1">blaat</div>
<div id="content1">blaat2</div>
</div>

it is styled so you can NOT hover div1 without hovering one of the other 2 divs.
Now i’ve got a mouseout on div1.
The problem is that my div1.mouseout gets triggered when i move from content1 to content2, because their mouseouts are bubbling.
and the event’s target, currentTarget or relatedTarget properties are never div1, since it is never hovered directly…
I’ve been searching mad for this, but I can only find articles and solutions for problems who are the reverse of what I need. It seems trivial but I can’t get it to work…
The mouseout of div1 should ONLY get triggered when the mouse leaves div1.

One of the possibilities would be to set some data on mouse enter and mouseleave, but I’m convinced this should work out of the box, since it is just a mouseout…

EDIT:

bar.mouseleave(function(e) {
                if ($(e.currentTarget).attr('id') == bar.attr('id')) {
                    bar.css('top', '-'+contentOuterHeight+'px');
                    $('#floatable-bar #floatable-bar-tabs span').removeClass('active');
                }
            });

changed the mouseout to mouseleave and the code worked…

  • 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-05-14T00:28:04+00:00Added an answer on May 14, 2026 at 12:28 am

    Use the mouseleave event instead or mouseout for this, it handles your specific issue. See here for details

    From the docs on the difference:

    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.

    Example markup:

    <div id="outer">
      Outer
      <div id="inner">
        Inner
      </div>
    </div>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi I've got something like the following HTML: <div class="container"> <img src="first.png" /> <img
i've got the following Problem / Question: I have HTML Code like this: <div
I've got following html structure: <div style=width:100%> <div style=float:left; width:70%><input /></div> <div style=float:left>element with
This is probably a simple thing, but ive got the following code: <div> @using
I've got the following HTML layout: div |-- h3 |-- ul |-- li |--
I've got the following HTML and Javascript: <noscript> <div id=player> <h2>Warning! You should enable
I'm using jQuery 1.3.2: <script src=../../Scripts/jquery-1.3.2.js type=text/javascript></script> I've got the following html: <div id=container-div>
I've got the following html: <html> <body> <div id=note1 class=note> <div class=note-header>Note</div> <div class=note-content></div>
I've got the following html: <ul id=clients-strip> <li> <a href=http://example.com/case-studies/ data-colour=/images/made/assets/images/article-images/client-colour.png> <img src=/images/made/assets/images/article-images/client-grayscale.png alt=Client
I've got the following ASP.NET 4 MVC 3 code in a view: @Html.TextBoxFor(model =>

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.