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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T16:19:56+00:00 2026-06-03T16:19:56+00:00

Not sure how to solve an issue I’m having at the moment. I’m building

  • 0

Not sure how to solve an issue I’m having at the moment. I’m building a Javascript and PHP powered image gallery. The basic div structure is that I have a div that contains the gallery as a whole, one for the image being displayed, and a div containing a “previous button”, and another containing a “next button.”

The next/previous buttons are positioned on the left/right side at the bottom of the image container div (the gallery container is set to relative position, the button divs to absolute). By default they are made non-visible using jQuery, and become visible when you hover over the image container div. The issue I’m having is when you hover over the container div, and then over the arrows, the transition effect re-plays and I’m not sure how to fix that using HTML/CSS/JS. My current structure for the divs is

<div id="galleryContainer">
  <div id="imageContainer">
    <img src="img" />
  </div>
  <div id="leftArrow"></div>
  <div id="rightArrow"></div>
</div>

How do I make it so my fadein/out effect stops acting all bugged when I hover over the next/prev buttons? I’ve tried a bunch of combinations of using “onmouseover” listeners when I establish the div, to using jQuery listeners, to trying to change up the hierarchy of the drivs. Any help would be appreciated!

Edit: Here is my current jQuery code of what I’m trying to do:

$(document).ready(function(){

$("#imageContainer").mouseover(function()
{
    $("#leftArrow").fadeIn();
    $("#rightArrow").fadeIn();
});

$("#galleryContainer").mouseout(function()
{
    $("#leftArrow").fadeOut();
    $("#rightArrow").fadeOut();
}); 
});

When I put the buttons inside of the imageContainer it still does the fade bug/effect.

  • 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-03T16:20:00+00:00Added an answer on June 3, 2026 at 4:20 pm

    You probably want to use $.mouseleave and $mousenter A problem is that the mouseout and mouseover events bubble. Then, your handlers are called when those events are fired on #galleryContainer when it happens in any of its descendants

    http://jsfiddle.net/z2Y8a/20/

    $("#imageContainer").mouseenter(function() {
        $("#leftArrow").fadeIn();
        $("#rightArrow").fadeIn();
    });
    
    $("#galleryContainer").mouseleave(function() {
        $("#leftArrow").fadeOut();
        $("#rightArrow").fadeOut();
    }); 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I have an issue that I'm not 100% sure on how to solve.
so I have a tricky issue here I'm not sure how to solve. I
i'm not sure how to solve the following problem: i have a triangle with
I have a simple problem but I am not sure how to solve it.
I have the following to solve and I'm not sure how to approach this:
I've got a problem I'm not sure how best to solve. I have an
I've run into a little difficulty and I'm not sure how best to solve
I am not sure if this is a Covariance and Contravariance issue but I
My issue seems to be related to permissions, but I am not sure how
I want add shadow/cover (I'm not sure how to name it) to my div,

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.