Skip to content

Instantly share code, notes, and snippets.

@trg1984
Created January 18, 2017 13:15
Show Gist options
  • Save trg1984/1e1fc420f4feaff204029a026ec56c8a to your computer and use it in GitHub Desktop.
Save trg1984/1e1fc420f4feaff204029a026ec56c8a to your computer and use it in GitHub Desktop.
Adds a red corner pointer to the given pixel coordinates. Useful for quickly determining where exactly the given coordinates are on the screen.
function addPointer(x, y) {
$('body').append('<div style="position:absolute; left: ' +
x +
'px; top: ' +
y +
'px; border-left: 3px solid red; border-top: 3px solid red; box-sizing: border-box; width: 10px; height: 10px; z-index:1000000000;"></div>');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment