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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T09:01:50+00:00 2026-05-29T09:01:50+00:00

So, I have a strange bug. if very fast move mouse around the page

  • 0

So, I have a strange bug. if very fast move mouse around the page jquery replaces the wrong img src in the square blocks with preview.

this is js code:

  $('.mini-info').bind('mouseenter', function() {   
    var xex = $(this).position().left;
    var yey = $(this).position().top; 
    sim = $('img', this).attr('src');
    kuda = $('a', this).attr('href');


    $('#bcase div.'+$(this).attr('id')).addClass('active').css({
      'top' : yey,
      'left' : xex
    }).attr({'onclick': 'location.href="'+kuda+'"'});

    var omg = $('#bcase div.'+$(this).attr('id')+' div.b').length;

    $('#bcase div.'+$(this).attr('id')+' div.b').css({
      'width': wid/omg
     });
  });   



  $('#bcase > div').bind('mouseleave', function() {
    $(this).removeClass('active'); 
    $('.mini-info#'+$(this).attr('class')+' img').attr({'src': sim});
  });

It’s possible to fix?

Normal work is when you move mouse upon one of the square block with preview, script will change image under the mouse. It’s work fine. But the bug above is not good…

  • 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-29T09:01:54+00:00Added an answer on May 29, 2026 at 9:01 am

    In mouseleave event, you use simvariable which is define in mouseenter event.
    Then with fast mouse mouvement, the mouseenter of an other div will be called before the mouseleave of previous event.

    You have to change your arch. For example, when you create the new div in mouseenter, bind the mouseleave event at this point.
    Something lke that (not tested):

    $('.mini-info').bind('mouseenter', function() {   
      var xex = $(this).position().left;
      var yey = $(this).position().top; 
      var sim = $('img', this).attr('src');
      kuda = $('a', this).attr('href');
    
    
      $('#bcase div.'+$(this).attr('id')).addClass('active').css({
        'top' : yey,
        'left' : xex
      }).attr({'onclick': 'location.href="'+kuda+'"'})
      .bind('mouseleave', function() {
        $(this).removeClass('active'); 
        $('.mini-info#'+$(this).attr('class')+' img').attr({'src': sim});
      });
    
      var omg = $('#bcase div.'+$(this).attr('id')+' div.b').length;
    
      $('#bcase div.'+$(this).attr('id')+' div.b').css({
        'width': wid/omg
       });
    });   
    

    see the jsfiddle : http://jsfiddle.net/bouillard/ptJQy/

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

Sidebar

Related Questions

I have datagrid and noticed strange bug: I set HeadersVisibility=All. And when move mouse
I have a very strange bug, which I believe is caused by some code
I have encountered a very strange problem in using jQuery load() . I used
I have a very strange bug going on. I cannot get the flyout to
I have encountered a very strange bug in Firefox. I have a javascript function
I have a very strange bug in a shipping iPad/iPhone app that I can't
I have isolated very strange bug from our current project: index.html (demo) and iframe.html
I'm experimenting with CUDA and I ran into a very strange bug. I have
I have a strange bug. I launch a PHP Unit test Suite. At the
I have a strange bug happening in my script. I have 3 balls on

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.