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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:22:31+00:00 2026-05-23T09:22:31+00:00

I have 3 boxes and once user hovers any, if changes the content of

  • 0

I have 3 boxes and once user hovers any, if changes the content of the big main div from default to the related div via featVals hash table

At the if ($('#estate-feature, #carrier-feature, #cleaning-feature').is(':hover')) { part of my code, I want to check if any of these 3 div boxes are currently hovered, if not display the default content (defaultFeat variable).

However I am getting Uncaught Syntax error, unrecognized expression: hover error from Google Chrome Javascript Console.

How can I fix it ?

Regards

$('#estate-feature, #carrier-feature, #cleaning-feature').hover(function () {
    var currentFeatCont = featVals[$(this).attr('id')];
    headlineContent.html(currentFeatCont);
}, function () {
    headlineContent.delay(600)
        .queue(function (n) {
        if ($('#estate-feature, #carrier-feature, #cleaning-feature').not(':hover')) {
            $(this).html(defaultFeat);
        }
        n();
    })
});
  • 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-23T09:22:32+00:00Added an answer on May 23, 2026 at 9:22 am

    :hover isn’t an attribute of the element. Also, you are binding to the hover out there so you know that you have left the hover and can restore the default content. If you want the hover-triggered content to remain for a period after the point has left the trigger element then you’ll either need to assume that you aren’t going to roll over another trigger or implement a shared flag variable that indicates if the default text restore should be halted. e.g.

    var isHovered = false;
    $('#estate-feature, #carrier-feature, #cleaning-feature').hover(
        function() {
                    var currentFeatCont = featVals[$(this).attr('id')];
                    headlineContent.html(currentFeatCont);
                    isHovered = true;
        }, 
        function() {    
                isHovered = false;
                headlineContent.delay(600)
                .queue(function(n) {
                    if (!isHovered) {
                        $(this).html(defaultFeat);
                    }
                    n(); 
                })
        }
    );  
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have 2 div boxes. It's all working fine but when the browser is
i currently have a form that has several check boxes, once all the boxes
From VBA I'm setting a series of text boxes to have DSum controlSources: Me.Oct.ControlSource
I have two select boxes, the second of which is populated once the first
Original Problem: I have 3 boxes each containing 200 coins, given that there is
We're writing Windows desktop apps using C++ and Win32. Our dialog boxes have an
I have text input boxes. There is validation for each of the boxes using
I have two text boxes t1 and t2 in an html page. I'd like
I have 2 input boxes that are not disabled. When either gets focus no
I have two linux boxes. Both Fedora 11 x64. On one, I downloaded the

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.