$(function() { $(document).on('click dblclick contextmenu', function(e){ e.preventDefault(); $(document.body).append('
Has been clicked at ' + e.clientX + ',' + e.clientY + '
'); }) })