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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T20:02:27+00:00 2026-05-14T20:02:27+00:00

anyone know how to stop a .hover happening again before the mouseout animation has

  • 0

anyone know how to stop a .hover happening again before the mouseout animation has finished?

I have the following code which has 4 anchors. Once hovered over the anchor the related anchor slides in using animation. My problem is you hover out and in quickly, before the square has been set back to 0px it increases the slide distance.

    <body class="home">
<div id="container">
   <a class="page-link homet" id="anim-1"></a>
   <a class="page-link about" id="anim-2"></a>
   <a class="page-link portfolio" id="anim-3"></a>
   <a class="page-link contacts" id="anim-4"></a>
  <div id="header">
   <div id="logo">
   </div>
   <ul id="navigation">
    <li><a id="1"></a></li>
    <li><a id="2"></a></li>
    <li><a id="3"></a></li>
    <li><a id="4"></a></li>
   </ul>
  </div>
  <div id="main">
   <div id="left-content">

   </div>
   <div id="main-content">

   </div>
  </div>
 </div>
</body>
</html>

Jquery

 var cc = {
   displayAnim : function () {
    actionLink = $("#container #header #navigation li a");
    movePosition = "0";
    $("#container a.page-link").css({ position:"absolute", right: 0});

    $(actionLink).hoverIntent( 

    function() {
     circleToReveal = $(this).attr('id');
      switch (circleToReveal) {
       case "1" :
        movePostion = "386"
        break;
       case "2" :
        moveposition = "514"
        break;
       case "3" :
        movePosition = "643"
        break;
       case "4" :
        movePosition = "400"
        break;
       default :
        movePosition = "772"
      };
      /* console.log(movePosition); */

      $("#container #anim-" +circleToReveal+ "").stop().animate({"right": "+="+ movePosition +"px"}, "slow");
     },
     function() {
      $("#container #anim-" +circleToReveal+ "").stop().animate({"right": "-="+ movePosition +"px"}, "slow");
     }
    );
   }
  };

  $(window).load (function () { 
   $("body").addClass('js');
   $("a.pagelink").hide();
   cc.displayAnim();
  }); 
  • 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-14T20:02:27+00:00Added an answer on May 14, 2026 at 8:02 pm

    Couple of ideas.

    Don’t use +=. Instead calculate the desired destination based on your switch statement plus or minus the starting position, then apply that value to your .animate().

    If you want to prevent the animation from occurring while an element is currently animated, you could use jQuery’s :animated selector to prevent it.

    Something like:

    if($("#container #anim-" +circleToReveal+ "").is(':not(:animated)') ) {
        // Perform animation.
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone know how to make this code stop the knob from rotating past
I have played a sound in classA, and does anyone know how to stop
Does anyone know how to stop jQuery fromparsing html you insert through before() and
Does anyone know how to stop Visual Studio from automatically refreshing the Design view
Anyone know an example of phonegap with $.ajax() in github for Android? I have
Anyone know if the C2DM source code is open? If so, where is it
Does anyone know how to stop a UIWebView from bouncing vertically? I mean when
Anyone know why this is happening? Whenever you go to a page on the
Does anyone know why this code doesn't work: public class CollectionViewModel : ViewModelBase {
Does anyone know how to stop this slideshow from 'caching' the amount of clicks

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.