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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T16:25:01+00:00 2026-05-13T16:25:01+00:00

I am trying to get an image to fade out when there has been

  • 0

I am trying to get an image to fade out when there has been no mouse action for 3 seconds and then fades in when the mouse is again moved.

I would also be appreciative if anyone could tell me how I can make the image be hidden until the mouse moves. So when the page loads up you don’t see the image until the mouse moves.

This is what I have so far…

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 TRANSITIONAL//EN">
    <html>
        <head>
        <title></title>
        <script type="text/javascript">
            var timer;
            $(document).mousemove(function() {
            if (timer) {
            clearTimeout(timer);
            timer = 0;
            }
            $('#top:visible').fadeIn();
            timer = setTimeout(function() {
            $('#top').fadeOut()
            }, 3000)
            })
        </script>
        </head>
        <body>
            <div id="top">
                <img src="graphics/logo/logo.psd" title="" alt="">
            </div>
        </body>
    </html>

Thanks so much for your help!

  • 1 1 Answer
  • 5 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-13T16:25:01+00:00Added an answer on May 13, 2026 at 4:25 pm

    I’ve updated my answer with an all-in-one page. Hopefully this will make things more clear. Better to have javascript in its own file, but this will get you going.

    Make sure that this line:

    <script type="text/javascript" src="jquery-1.4.1.min.js"></script>
    

    correctly points to your jQuery file with the right location and name.

    Let me know how it goes.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html>
    <head>
    <title>tester page</title>  
    
    <style> 
        <!--
    
        -->
     </style>
    
    <script type="text/javascript" src="jquery-1.4.1.min.js"></script>
    
    <script type="text/javascript"> 
    
        $(document).ready(function() {
        var $top = $('#top');
        var $document = $(document);
        var timer = null;
        var timerIsRunning = false;
    
        $top.hide();
    
        $('#menu').mousemove(function(e){
            e.stopPropagation();
        });
        setTimeout(function() {
                            $document.mousemove(function(e) {
                                    if($top.is(':hidden')) {
                                        $top.fadeIn();
                                    } else {
                                        if(!timerIsRunning) {
                                            timerIsRunning = true;
                                            clearTimeout(timer);
                                            timer = setTimeout(function() { $top.fadeOut();  }, 5000);
                                            setTimeout(function() {timerIsRunning = false;}, 2000);
                                        }
                                    }
                            });
                    }, 500);
    
    });
    
    </script>
    </head>
    <body>
    <div id="top">
       <img src="graphics/logo/logo.psd" title="" alt="">
    </div>
    </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been trying to get an Gtk2::Image object in this Perl Gtk2 application to
I am trying to create a simple image slideshow that fades in and out
Using jquery, I am trying to get a background image to fade into a
I am trying to get the fade effect of my image slider plugin to
Im trying to get an image from a wcf rest service like so: [ServiceContract]
I'm trying to get an image sitting at a URL that is protected by
I'm trying to get an image off the internet from an URL in java.
I'm trying to get an image from URL and save it to the isolated
I am trying to get an image from URL in Android and set it
I am trying to get an image from an HTTP server using Perl. I

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.