SyntaxFix
Write A Post
Hire A Developer
Questions
simple solution is this:
game.js:
document.addEventListener('click', printMousePos, true); function printMousePos(e){ cursorX = e.pageX; cursorY= e.pageY; $( "#test" ).text( "pageX: " + cursorX +",pageY: " + cursorY ); }