How can I change background image after x minutes of mouse inactivity?
I can not find anything on the subject. What I am hoping to do is to replace the HTML/CSS background image after a period of mouse/keyboard inactivity, or replace the whole HTML page. There is a "onmousemove" but nothing like "onmousestill". Maybe I am not "googling" with the right keywords.
Can anyone make a suggestion? CSS or Javascript? Thank you for your help. |
|
I take the question to mean you want to change a background image in an HTML element in a web page if the mouse is inactive in the browser window, is that right?
If so, how about an implementation using javascript setTimeout() and clearTimeout() functions. Set a timeout which will change the background by modifying a CSS attribute on the target element, or reload the page. Then use onmousemove() to call clearTimeout() to stop the timeout action, then reset the timeout. |
All times are GMT -5. The time now is 05:49 PM. |