Skip to content

Instantly share code, notes, and snippets.

@helb
Created October 15, 2014 14:46
Show Gist options
  • Save helb/de79b75a69eed360bb1c to your computer and use it in GitHub Desktop.
Save helb/de79b75a69eed360bb1c to your computer and use it in GitHub Desktop.
jquery – show clicks for screencast recording
$(document).click(function(event) {
var clickMarker = $("<div/>")
.css({
width: '20px',
height: '20px',
borderRadius: '10px',
boxSizing: 'border-box',
backgroundColor: "#ff0037",
opacity: 0.85,
top: event.pageY - 10,
left: event.pageX - 10,
position: 'absolute'
})
.hide()
.appendTo($('body'))
.fadeIn(150)
.fadeOut(1200, function(){
$(this).remove();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment