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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T23:07:15+00:00 2026-06-10T23:07:15+00:00

i have a div containing multiple divs with absolute position, i want to handle

  • 0

i have a div containing multiple divs with absolute position, i want to handle the mouse enter event for the parent div i use this fiddle:
fiddle
it doesnt works correctly is their any other way to handle this problem ?

HTML Markup

<div id="content">
SYDNEY (Reuters) - An Australian man had his driving licence suspended for 10 months and was fined after he was
 <div class="abs"></div>
caught driving a scooter made of a motorised beer cooler capable of carrying several dozen drinks -- after knocking back a few.
</div>
<div id="output">   
</div>    

SCRIPT

$(function() {
var output = $("#output");
$("#content")
  .mouseenter(function(e){
    output.text("I'm in!");
}).mouseout(function(e) {
    output.text("I'm out!"); 
});
});​


#content {
background-color:#cccc99;   
position:relative;     
}
.abs{
 position:absolute;
 top:0px;
 left:70px;
 background-color:red; 
 width:30px;
 height:30px;   
 }​
  • 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-10T23:07:16+00:00Added an answer on June 10, 2026 at 11:07 pm

    You’re halfway there yourself. Because the mouseover and mouseout events bubble, they will trigger multiple times as you mouseover and mouseout of child elements of the element your event handlers are watching. jQuery provides the IE-inspired mouseenter and mouseleave events, which only trigger for mouse events on the watched elements themselves, and are not triggered for events on the element’s children. Use the mouseover and mouseleave events, and your code will work as expected. See this updated fiddle. Alternatively, use the jQuery hover syntax, which internally uses the mouseenter and mouseleave events, wrapped in a convenient syntax.

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

Sidebar

Related Questions

I have a div containing an event I want it to look like this
I have a div containing several other divs with setting float:left. Now I want
I have div containing multiple divs and text. The inner divs are alternately floated
I have a div containing some text. This div used to be position:fixed ,
I have a div containing a form. I use that div as a dialog
I have a DIV containing an image and a second DIV. The parent DIV
I have a div, containing text and a few links. I want to trigger
So I have 3 divs contained inside a containing div like such: <div id=contain>
The situation is this: I have a div with overflow auto containing a table.
Say I have a div container with multiple divs with some width and height.

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.