Created
February 15, 2014 13:18
-
-
Save darrenscerri/9019209 to your computer and use it in GitHub Desktop.
Bookmarklet to add an element to the page which displays cursor coordinates
This file contains hidden or 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
javascript:(function() { | |
var div = document.createElement('div'); | |
div.style.cssText = 'position:fixed;bottom:10px;right:10px;padding: 4px 8px;border: 1px solid black;z-index:99'; | |
document.body.appendChild(div); | |
document.onmousemove = function(e) { | |
div.innerHTML = e.clientX + ' : ' + e.clientY; | |
}; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment