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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:26:11+00:00 2026-06-16T00:26:11+00:00

I have a sort of silly website request – they want the hover states

  • 0

I have a sort of silly website request – they want the hover states to animate because they think no one will know there are links there otherwise…

Anyway… I created a slideshow to show the effect I’m trying to create – but now I can’t get it to work with the jQuery code. I found what I thought was an answer here: Trying to loop between CSS classes/hover states – Jquery

but even incorporating this new code, the animation/toggle doesn’t work.

I assume I’m missing something obvious – can anyone help?

Here’s the slideshow version to show effect I’m going for:
http://test.fatcat-studios.com/gtm/index.html
but I want to do this with jQuery so when you interact with it, the correct hover state shows upon actual mouse over.

And here’s my jQuery code:

    $(function() {
    var doToggle = true;                            
    $('a.res').removeClass('hover');
    $('a.com').addClass('hover');                           
    var tid = setInterval( function() {
    if (doToggle) $('a.res, a.com').toggleClass('hover');
    }, 2000);

    setTimeout(function() {

    if (tid) clearInterval(tid);

    $('a.res,a.com').removeClass('hover');
    }, 30000); // stop toggling after 30 seconds

    $('a.res,a.com').hover( function() {
    doToggle = false;
    }, function() {
    doToggle = true;
    });
    });

Any help is much appreciated! Let me know if there’s more info needed.
Haikukitty

  • 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-06-16T00:26:12+00:00Added an answer on June 16, 2026 at 12:26 am

    Try this :

    $(function() {
        var autoToggle = true;
        var $togglers = $('a.res, a.com');
    
        var tid_1,
            tid_2 = setTimeout(function() {
            clearInterval(tid_1);
            $togglers.removeClass('hover');
            autoToggle = false;
        }, 30000); // stop toggling after 30 seconds
    
        $togglers.hover(function() {
            clearInterval(tid_1);
            $togglers.removeClass('hover');
            $(this).addClass('hover');
        }, function() {
            if(autoToggle) {
                $('a.res').removeClass('hover');
                $('a.com').addClass('hover');
                tid_1 = setInterval(function() {
                    $togglers.toggleClass('hover');
                }, 2000);
            }
            else {
                $togglers.removeClass('hover');
            }
        }).triggerHandler('mouseout');
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to have sort of live blogging that will allow a reporter to
I have a sort of unique situation....I want to populate a ModelChoiceField based of
I was looking at the silly/cute/brilliant sleep sort that seems to have originated over
I have 3 user controls, each one of which will need to pull data
I want to have sort of indiacator at left side of the line wherever
Well, I sort of want to have sort of a faint striped pattern across
I am making an ASP.NET website where i have sort of a static image
i have a silly doubt regarding counting sort.What is the need to get the
I have sort of a tricky problem I'm attempting to solve. First of all,
So in nokia we can have sort of Microsoft Silverlight installed to system. We

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.