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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:46:11+00:00 2026-05-27T03:46:11+00:00

My problem: I’ve got several (tell 10) elements. Hovering every one of them executes

  • 0

My problem:
I’ve got several (tell 10) elements. Hovering every one of them executes some function with animation.
I do want to make so, that if a function (and animation) for one of the elements is running, hovering some other elements does not execute the function.

For example: I’ve hovered an element 2. Animations starts. As animation lasts, i hover elements 3, 4 and 5. The mouse cursor stays at 5.

What do I need, that when the animation for element 2 is over, and the cursor stays over 5, the animation for five starts automatically.

I’ve made it so:

var blocked = 0;    

    $(".my_element").live('hover',function(){
        if(blocked == 0){
        blocked = 1;
        $(this).find('.content').animate({left:"-=100px"}, function() {
            blocked = 0;
        });
      
    }, function(){
});

But after the function is complete, the next function does not start until I wiggle the mouse.

  • 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-27T03:46:12+00:00Added an answer on May 27, 2026 at 3:46 am

    I think your code is pretty ok, but at the moment the animation stops you’d like to throw an event on the currently hovered element. That should trigger the animation again. And I guess you’d like to exclude the previously animated element too.

    Something like this:

    var blocked, lastHovered, previous;
    $(".my_element").live('hover', function(){
        lastHovered = this;
        if (!blocked && this != previous){
          blocked = true;
          previous = this;
          $('.content').animate({left:"-=100px"}, 1000, function() {
            blocked = false;         
            if (lastHovered) {
              $(lastHovered).trigger("mouseenter");
            }
          });
        }
      }, function() {
        lastHovered = false;
      });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Problem: I have two spreadsheets that each serve different purposes but contain one particular
Problem (simplified to make things clearer): 1. there is one statically-linked static.lib that has
Problem: We have a web app that calls some web services asynchronously (from the
Problem One: </a> 19-10-2011, 04:49 PM </td> <td class=thread How to fetch the DATE
Problem statement: I want to upload a large binary (such as an audio clip)
Problem: I need to write a function which returns a value for a input
PROBLEM : I am having problems getting socket.IO to connect in some circumstances, so
Problem: Sometimes you will want to access a component from javascript with getElementById ,
Problem: Every time I start a new session of Internet Explorer, the web application
Problem: user made some selection in the multi-selection listbox, then pressed a checkbox, and

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.