Hello.
It is necessary to track where the user clicks. Those. not just click on any element - but on the whole document, and you need to save the coordinates. For example, I clicked in the upper left corner - the function should return the value 1: 1, or something like that.
Is it possible to implement this?
UPD: Solution
var coords = {}, i = 0; $(document).click(function(e){ coords[i++] = {'x':e.pageX,'y':e.pageY}; $('body').text( JSON.stringify(coords) ); });