How To Alter This Code So That It Only Redirects If There Is No Mouse Movement
- by user1426261
I have the following java script which redirects the user to another website (google in this case).
<script type="text/JavaScript">
window.setTimeout("location=('http://www.google.com');",5000);
</script>
However, although i want the website to redirect to another website, i dont want it to redirect for no reason. My aim is for the website to redirect automatically on the condition that the cursor hasnt been moved for a little while.
is this possible?