I’m creating a header menu that slides down when you move the mouse within in the browser window.
But I want to have it slide up after the mouse hasn’t moved for 5 seconds.
Here is what I have so far: http://jsfiddle.net/BEzbw/
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
jQuery throttle/debounce is a great plugin for doing things like this safely. jsFiddle
ps: bear in mind that attaching to
<html>in that way could get your event blocked by other page elements (although unlikely for a mousemove event).