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 5946899
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T16:53:17+00:00 2026-05-22T16:53:17+00:00

I have a parent element that when hovered over shows an element. I also

  • 0

I have a parent element that when hovered over shows an element. I also have a child element that when hovered over shows a different element.

I don’t want them both to fire at the same time – i.e. if you’re hovering over the child I only want to show it’s associated element – and suppress the hovering over of the parent element.

I’m having trouble getting this to work reliably. Probably missing something obvious. Any ideas?

Edit – clarification:

The “parent” and the “child” in this case are separate reusable components that don’t know about each other, so I can’t actually inject the context from one into the other

Here is the demo I’ve set up using jQuery & the hoverIntent plugin.

HTML:

<div id="parentBar">
    <ul id="childMenu">
        <li>Menu 1</li>
    </ul>
</div>

<div id="barInfo">
    <p>This is shown when hovering overing inside of the parent bar.</p>
</div>

<div id="menuInfo">
    <p>This is shown when hovering over inside of the child menu.</p>
</div>

CSS:

#parentBar{width:500px;border:solid 1px black;}
#childMenu{margin-left:10px;padding-left:10px;width:100px;border:solid 1px green;}
#menuInfo, #barInfo{display:none;}

JavaScript:

$('#parentBar').hoverIntent({
    //interval: 500,
    over: function(e) {
        $('#barInfo').show();
    },
    out: function(e) {
        $('#barInfo').hide();
    }
});

$('#childMenu').hoverIntent({
    //interval: 250,
    over: function(e) {
        $('#menuInfo').show();
    },
    out: function(e) {
        $('#menuInfo').hide();
    }
});

$('#childMenu').bind('mouseenter', function(e){
    e.stopPropagation();
});

You can view it here on jsFiddle: http://jsfiddle.net/hNqQ7/1

  • 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-22T16:53:18+00:00Added an answer on May 22, 2026 at 4:53 pm
    var flag = false;
    $('#parentBar').hoverIntent({
      interval: 500,
      over: function(e) {
        if(!flag) {
            $('#barInfo').show();
        }
      },
      out: function(e) {
        $('#barInfo').hide();
      }
    });
    
    $('#childMenu').hoverIntent({
      interval: 250,
      over: function(e) {
        $('#menuInfo').show();
      },
      out: function(e) {
        $('#menuInfo').hide();
      }
    }).mouseenter(function(){
        flag= true;
    }).mouseleave(function(){
        flag = false;
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know I can have 1 parent element and 1 child element in my
I have a parent project that is branched to many dependent child projects. I
I have a parent element that has dynamic text in it that needs to
In short, I'd like to select a child element that has either Parent A
I have an element with id: #post and that element has parent <li> .
I have an element with some child elements. When the mouse leaves the parent
I have written some CSS which targets elements using the parent > child selector.
I have parent/child relationship set up via Node Reference. A Child record can have
When you have parent-child tables and you wish to use a DetailsView to edit
If you have Parent has_many :children Child Is there any reason a foreign key

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.