Created
June 7, 2016 16:03
-
-
Save gaelollivier/a4d260eb867cbfe9c84cb97156001a20 to your computer and use it in GitHub Desktop.
Track mouse position (useful for e2e debugging, for example)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="mouse" style="width:10px; height: 10px; background: red; position: absolute;"></div> | |
<script type="text/javascript"> | |
setTimeout(function () { | |
var $ = jQuery; | |
$(document).mousemove(function (e) { | |
$('#mouse').css({ top: e.clientY + 1, left: e.clientX + 1}); | |
}); | |
}, 1000); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment