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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T13:38:56+00:00 2026-06-15T13:38:56+00:00

This answer: cancelling mouseout event when element is overlaid Gets somewhere near, but isn’t

  • 0

This answer:

cancelling mouseout event when element is overlaid

Gets somewhere near, but isn’t really what I am after as it’s sort of reversing my problem.

I am making an image gallery similar to the Facebook image viewer.

An image is loaded into an absolutely positioned div which is centred on screen and floats above the main page with a z-index value.

To the left and right of the image are small div elements with absolute positioning and a z-index 1 higher than the image. These div elements are left and right arrows to click through the gallery.

The arrows are hidden when the image loads, but then when the user moves his mouse over the image, the arrows should fade in, then if they move off again, they fade out… just as the Facebook viewer does.

I am using hoverIntent to achieve this, and it works fine.

BUT… when the user moves his/her mouse into the arrow div, hoverIntent sees this as a mouseleave event on the image which is underneath and hides the arrow…

So… what I need is to be able to have hoverIntent ignore the arrow divs.

The code I am using for hoverIntent is quite straight foward:

        function showArrows() {
            $('.imgNav').fadeIn(500);
        };
        function hideArrows() {
            $('.imgNav').fadeOut(500);
        };
        $(img).hoverIntent(showArrows, hideArrows);

Obviously img is the jQuery image object and .imgNav is the classname for the arrows.

EDIT:

I have created a fiddle here: http://jsfiddle.net/jhartnoll/cE6gu/

  • 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-15T13:38:57+00:00Added an answer on June 15, 2026 at 1:38 pm

    Using your fiddle example, changing

    $('.enlarged').hoverIntent(showArrows, hideArrows); 
    

    to

    $('.imgViewer').hoverIntent(showArrows, hideArrows); 
    

    did the trick for me http://jsfiddle.net/cE6gu/4/

    Note, on hoverintent website it says its designed to ignore children (here) so you just need to make sure you call hoverintent on a parent element that contains all these divs.

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

Sidebar

Related Questions

I posted this answer (more of an idea really) but haven't been able to
This answer has helped me largely but hasn't fully resolved my issues. I'm using
I saw this answer to a similar question , but it always scares me
This answer to Command line command to auto-kill a command after a certain amount
See this answer . It says: Six really bad examples; ... locking on a
I can't find this answer anywhere, but can you call a Stored Procedure from
This answer comes close to what I need but my situation is slightly different.
This answer shows how you can demote a commit to a patch, but how
I can't seem to find an answer to this, but what is the criteria
This answer to this question is fine, but I'm looking for ADO.NET code to

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.