I updated my answer on an all-in-one page. Hope this makes things clearer. It is better to have javascript in your own file, but that will help you.
Make sure this line:
<script type="text/javascript" src="jquery-1.4.1.min.js"></script>
correctly points to your jQuery file with the correct location and name.
Let me know how this happens.
<!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>
source share