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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T17:52:50+00:00 2026-05-24T17:52:50+00:00

My code is working fine but I don’t want it to fire when #stem

  • 0

My code is working fine but I don’t want it to fire when #stem and #case are hovered over, because they are part of the animation. (They are absolutely positioned over div_mainGraphic). Anyone have any ideas?

$('#div_mainGraphic').live("mouseenter mouseleave", function(event){
    if (event.type == 'mouseenter') {
        $('#stem').animate({"top": "-=35px"}, 500);
    } else {
        $('#stem').animate({"top": "+=35px"}, 150);
    }
});

Is the code that is working and I was thinking of doing something like this:

$('#div_mainGraphic').live("mouseenter mouseleave", function(event){
    if (event.type == 'mouseenter') {
        $('#stem').animate({"top": "-=35px"}, 500);
    }
    if (event.type == 'mouseleave') {
        $('#stem').animate({"top": "+=35px"}, 150);
    }
    if (event.location == '???') {
        ???
    }
});

Here is the HTML:

<div id="div_mainGraphic">
</div>
<img src="/images/img_stem.png" id="stem" />
<img src="/images/img_case.png" id="case" />
  • 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-24T17:52:50+00:00Added an answer on May 24, 2026 at 5:52 pm

    Try this along with your code, this will basically stop the event propagation on hover.

    $("#stem,  #case").hover(function(e){
       e.stopPropagation();
    });
    

    Use this code of yours

    $('#div_mainGraphic').live("mouseenter mouseleave", function(event){
        if (event.type == 'mouseenter') {
            $('#stem').animate({"top": "-=35px"}, 500);
        } else {
            $('#stem').animate({"top": "+=35px"}, 150);
        }
    });
    

    Alternatively you can also try to move #stem and #case elements into #div_mainGraphic since they are absolute positioned elements.

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

Sidebar

Related Questions

This is really strange but this code is working fine unless the value entered
I have jquery validation code which is working fine in ff but the same
I'using the following code to create thumbnails using ffmpeg but it was working fine
I created an ASMX file with a code behind file. It's working fine, but
My application was working fine but I don't know how suddenly allow_url_fopen set OFF
I’m trying to issue web requests asynchronously. I have my code working fine except
So basically this code was working fine before. I had some computer issues and
My code was working absolutely fine before the launch of iPhone SDK 3.0 ,
Hi Javascript gurus, I have this Javascript code which is working fine on Firefox
Here is my code, everything is working fine the only problem is with the

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.