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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T21:08:16+00:00 2026-06-02T21:08:16+00:00

Ok, lt me explain to you this very strange problem on which I am

  • 0

Ok, lt me explain to you this very strange problem on which I am working the second week right now without any solution.

Imagine I have an image 100x100px.
Around the whole image I have an image area 100×100 (let us call the image area ALPHA).
I have also second Image Area on the image, but this time not around the whole image, but just inside of it (10×10) in the middle of the image (let’s call the second Image area BETA).

That Means that image area BETA is inside of the image area ALPHA.

Now, I want to add a border to the image when I am with the mouse over my image area ALPHA and to remove the border when I am mouse out of the image area ALPHA with following code (via jQuery) :

$("area.ALPHA").hover(
  function () {
    $('img').css('border','1px solid #000');
  }, 
  function () {
    $('img').css('border','none');
  }
);

This code is working very well.

But I want also that when I am hovering over my second image area BETA that the code above will be executed. But it is not working.

I know why it is not working, because when I am with the mouse over my image area BETA, I am also with the mouse out of the image area ALPHA.

I was trying to solve this freakin problem, but unfortunately I realised I am not able to solve this problem on my own, so please help me. Is there any possibility to do something like this for example ?:

if ($("area#ALPHA").mouseout === false && $("area#BETA").mouseenter === true) {
   // ignore the first event (or something like this)...
}

My first thought was event.stopPropagation(), but it is not working. Maybe I’ve just used it the wrong way….

PS: I know I could do this same just with CSS or without the image area. But I have to do it this way…

If you dont understand my explanation, I am ready to explain it one more time more exactly.

  • 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-02T21:08:17+00:00Added an answer on June 2, 2026 at 9:08 pm

    This is my interpretation of your requirements example

        $(document).ready(function(){
    
          $("#ALPHA, #BETA").hover(
            function () {
              $(this).css('border','1px solid #000');
            }, 
            function () {
              $(this).css('border','none');
            }
         );
       });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I will try to explain this very simple. So, I skipped any code which
This is very strange, maybe someone can explain what's happening, or this is a
Ladies and gents, I found a very strange behavior which I cannot explain: Assume
Okay this is very hard to explain, but i want to add padding to
This is a very hard to explain question and I hope my code extract
The title isn't very clear but I'll try to explain. Having this class: class
The easiest way to explain this problem is to show you some code: Public
I stumbled upon a very strange bit of PHP code. Could someone explain why
This is going to seem a very strange question but im just playing about
While creating the sample, I noticed very strange behavior and due to which I

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.