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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:50:17+00:00 2026-05-23T11:50:17+00:00

I’m having a tricky time working through a jQuery issue. The page has a

  • 0

I’m having a tricky time working through a jQuery issue. The page has a feature image. When the user hovers on the feature image, a transparent overlay with some supporting content fades in, and if they move their mouse outside the feature the supporting bar fades out. So far so good, but…

I’d like to have the transparent overlay fade in, hold a few seconds, then fade out when the page loads (like a sneak peak). Pretty easy, I thought. But, what I didn’t consider was that the function also needs to check to see if the mouse is already over the feature area when the page is loaded. If it is, the support bar shouldn’t fade out until the user isn’t hovering on the feature area (e.g., the initial auto fade out is skipped). So:

  • Page loads
  • If the mouse isn’t over the feature area, show the overlay, wait
    a few secs, fade it out
  • If the mouse is over the feature area, show the overlay, don’t fade
    out until the user leaves the feature
    area
  • After the initial run, anytime the user is over the feature the overlay
    fades in, when they mouseout the
    overlay fades out

I can’t seem to figure out a clean way to do this (I’d rather not have to track the mouse coords). Any ideas appreciated 🙂

Here’s the page: http://collective.poccuo.com/

And here’s what I have at the moment:

$(window).load(function(){  
    $('#content.homepage #support').show().delay(2000).fadeOut(100,function(){
        $('#content.homepage').hover(function(){
            $("#content.homepage #support").delay(500).fadeIn(350);
         },function(){
            $("#content.homepage #support").fadeOut(150);
        });
    });
 });
  • 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-23T11:50:18+00:00Added an answer on May 23, 2026 at 11:50 am

    I think you should do it like this:

       var hideInitially = true; //This var does the magic
       $(window).load(function(){  
            $('#content.homepage').hover(function(){
                $("#content.homepage #support").delay(500).fadeIn(350);
                hideInitially= false; //If there has been a hover, don't hide on load
             },function(){
                $("#content.homepage #support").fadeOut(150);
            });
        $('#content.homepage #support').show();
        setTimeout(function(){ //Same as delay
           if(hideInitially) $('#content.homepage #support').fadeOut(100);  //Only hide if there wasn't a hover      
        }, 2000);
     });
    

    What this code does is to prevent initial hiding if there has been a hover.
    Hope this helps. Cheers

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
Basically, what I'm trying to create is a page of div tags, each has
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I want to count how many characters a certain string has in PHP, but
I have a jquery bug and I've been looking for hours now, I can't
I've got a string that has curly quotes in it. I'd like to replace
We're building an app, our first using Rails 3, and we're having to build
I need to clean up various Word 'smart' characters in user input, including but
I'm having trouble keeping the paragraph square between the quote marks. In firefox 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.