Display image at point using jQuery

Posted by Chris on Stack Overflow See other posts from Stack Overflow or by Chris
Published on 2010-03-24T20:19:02Z Indexed on 2010/03/24 20:23 UTC
Read the original article Hit count: 200

Filed under:
|
|
|
|

I have an image with a click event handler that captures the location where you clicked.

$("#image").click(function(e)
{
    var x = e.pageX - $(this).offset().left;
    var y = e.pageY - $(this).offset().top;
});

I want it so that when the image is clicked an image appears at that location on top of the image. How do I do this?

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about JavaScript