Skip to content

Instantly share code, notes, and snippets.

@grandchild
Last active August 29, 2015 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save grandchild/9a99272c1a0ab43aea86 to your computer and use it in GitHub Desktop.
Save grandchild/9a99272c1a0ab43aea86 to your computer and use it in GitHub Desktop.
JS: dbg show coords red circle
function dbg_showCoords(xy) {
var size = 500;
var hsize = size/2.0;
$("<div></div>").css({
position: "absolute",
left: xy.x-hsize,
top: xy.y-hsize,
width: size,
height: size,
"border-radius": size+"px",
"background-color": "red",
opacity: 0,
"z-index": 4,
}).appendTo(
"body"
).animate({
width: 1,
height: 1,
left: "+="+hsize,
top: "+="+hsize,
opacity: 0.85,
}, 300, function() {
$(this).remove()
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment