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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:59:10+00:00 2026-05-26T20:59:10+00:00

I have an image gallery. There is a list of thumbs. When you hover

  • 0

I have an image gallery.

There is a list of thumbs. When you hover over an image, a red x appears that allows you to delete that image.

My problem is, the x blinks when you hover on it. I am assuming that it sees as when the x div appears, it thinks it is a mouseout event so hides it.

Is there a better way to do this?

http://jsfiddle.net/guyfromfl/7ZNGY/1/

The x lines up correctly on my layout, not in jsfiddle, but its not that big of a deal to try to fix…

  • 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-26T20:59:11+00:00Added an answer on May 26, 2026 at 8:59 pm

    Without modifying your HTML structure, you need to use mouseenter mouseleave events like so:

    http://jsfiddle.net/7ZNGY/3/

    mouseout considers only the target of your binding element, so if you hover something inside the container it will count as a “mouseout”, while mouseleave understands that only leaving the container is counted as a “mouseout”

    So when you hovered over the X button, it counted as a “mouseout” which hides the element, and you are now in the plain container which triggers mouseover, and this loop causes the strobo effect

    edit code:

    $(document).delegate('.preview_image', 'mouseenter mouseleave', function (event) {
        var eId = $(this).find("img").get(1).id;
        var id = eId.replace("preview_", "");
        if (event.type == 'mouseenter') {
            $('#delete_img_' + id).fadeIn(100);
        } else {
            $('#delete_img_' + id).fadeOut(100);
        }
    });
    $(document).delegate('.delete_container', 'click', function () {
        alert("You dirty rat");
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an image gallery that I created by reading the contents inside a
I have an image gallery app that has a slider to control the width
what i want to do is that i have a nice image Gallery which
I am creating an image gallery where there are 9 list items per slide
I my working on the site that will have image gallery. Designer idea was
I have a list of images (thumbnails), displayed as a gallery. These images have
I have a image gallery like Google+ or Facebook and i want to avoid
I'm trying to have an image gallery where a caption is vertically centered inside
I have a simple image gallery here . All I want to do is
I have made a image gallery with jQuery found here: http://sarfraznawaz2005.kodingen.com/demos/jquery/image_gallery/ I just wanted

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.