Hi there.
I have the following code to track where a user clicks on an image:
<img src="images/test.jpg" id="testimg" />
<script type="text/javascript">
$("#testimg").click(function (ev) {
mouseX = ev.pageX;
mouseY = ev.pageY
alert(mouseX + ' ' + mouseY);
})
</script>
What I would like to do is, when the user clicks on the image, I want to draw a dot at the X,Y coordinates of the click.
Can someone give me some advice on how this can be done?
Cheers. Jas.