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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T16:11:29+00:00 2026-05-29T16:11:29+00:00

I have this weird problem whenever I roll my mouse over each of the

  • 0

I have this weird problem whenever I roll my mouse over each of the links in the code below a couple of times, the link will continue the hovering effect too long, and repeatedly apply it. I have it so that jquery changes their class when they’re hovered over so that it highlights the one the mouse is over.

<ul>        
    <li><a href="#" class="current">Home</a></li>       
    <li><a href="#" class="hover">News</a></li>     
    <li><a href="#" class="hover">Media</a></li>    
    <li><a href="#" class="hover">About</a></li>
</ul>

This is the jquery code:

$(document).ready(function() {
    $('.hover').hover(function() {
        $(this).switchClass('hover', 'hover-on', 250);
    }, function() {
        $(this).switchClass('hover-on', 'hover', 250);
    });
})

And the css classes simply contain a different background color.

Try the link below to see what I mean, I don’t know how to describe the behavior. By hovering over a couple of times, just move your mouse back and forth over each of the links a couple times.
http://74.63.212.104/nav/

  • 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-29T16:11:30+00:00Added an answer on May 29, 2026 at 4:11 pm

    Implementing a jQuery .stop() before starting the animation clears out anything left in the animation queue for that element.

    $(document).ready(function() {
        $('.hover').hover(function() {
            $(this).stop(true, false).switchClass('hover', 'hover-on', 250);
        }, function() {
            $(this).stop(true, false).switchClass('hover-on', 'hover', 250);
        });
    });
    

    EDIT:

    Explanation of .stop() parameters

    .stop( [clearQueue] [, jumpToEnd] )

    clearQueue – A Boolean indicating whether to remove queued animation as well. Defaults to false.

    jumpToEnd – A Boolean indicating whether to complete the current animation immediately. Defaults to false.

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

Sidebar

Related Questions

I have this really weird problem in my code (.Net Framework 3.5). So, in
I have this weird problem where whenever I #include SDL/SDL.h , my windows socket
I have this weird problem. Whenever i try to increase the post_max_size & upload_max_filesize
Ok so I have this weird problem, and I've searched Google many times for
I have this weird problem with setting up cookies with PHP. Everything worked fine
This is a weird problem. I have a solution for it, but I don't
I have a weird problem. I create this window, but its blank until i
I have a weird problem, and I don't know if this is the default
Ok, this one is weird, i have this code: $('#nps').submit(function(e) { e.preventDefault(); var images
Getting this weird LINQ error. title = System.Linq.Enumerable+WhereSelectEnumerableIterator`2[System.Xml.Linq.XElement,System.String Here is the code I have:

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.