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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T15:49:58+00:00 2026-05-12T15:49:58+00:00

I have a onmouse over even binded to all elements of the page. When

  • 0

I have a “onmouse over” even binded to all elements of the page. When the mouse is over an element, it draws a red border to the closest upper relevant element (try aardvark for an example).

I have the follwing code :

<p>
<img height="333" width="250" title="Image par hyperbolic pants explosion sous licence CC - http://www.flickr.com/photos/74502564@N00/2716444681/" class="illustred" src="context-selector-test_files/rha_20090929_antivirus.jpg" />
Ah là là... ces abrutis qui continuent à refuser d'installer des antivirus parce que "
<em>
Je ne télécharge pas !
</em>
" ou "
<em>
Je ne vais que sur des sites de confiance.
</em>
</p>

You can see that the “img” is inside the “P”.

The expected behavior is that when I go over “P”, it get bordered, then when I go to the “IMG”, the border go to the “IMG”.

It doesn’t.

The problem is not CSS because I don’t use CSS, but 4 divs to simulate 4 borders in position “absolute” around an element. This is a mandatory for what comes next.

The problem occurs when I go over the “IMG”, “mouseover” is indeed triggered, but immidiatly after, “mouse over” is triggered again on “P”. I would understand “P -> IMG” but “IMG -> P” bugs me. And why, 2 mouseover in one row? I didn’t move the mouse.

Now, what I am missing?

Specs :

  • html 4;
  • css 2;
  • jquery 1.3;
  • firefox 3.5;
  • ubuntu 9.04;
  • coffee 1.50 (l).
  • 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-12T15:49:59+00:00Added an answer on May 12, 2026 at 3:49 pm

    Stop event propagtion in your mouseover handler.

    $('selector').mouseover( function(e) {
        ...
        e.stopPropagation();
    });
    

    You also might want to think about using the hover() method or the hoverIntent() plugin. The latter will help to reduce any flashing as you simply drag your mouse across the page by enforcing a timed wait before the event handler is invoked.

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

Sidebar

Ask A Question

Stats

  • Questions 235k
  • Answers 235k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer As per convention, an add method should just retain the… May 13, 2026 at 6:08 am
  • Editorial Team
    Editorial Team added an answer It's fine. In HTML it is parsed as JavaScript, so… May 13, 2026 at 6:08 am
  • Editorial Team
    Editorial Team added an answer Its a list of lists, so num = int(''.join(''.join(l) for… May 13, 2026 at 6:08 am

Related Questions

I need to highlight a table row on mouse over. Seems like an easy
I have a bunch of li elements that I want to alternate in color
I'm looking for a straightforward way to make a Swing component forward all received
I have a web page with many (up to 100+) html elements on it.

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.