How can I insert a img wherever I click on the page?
I have the following code:
$(document).click(function(e){
var x = e.pageX;
var y = e.pageY;
var string = x +','+ y;
//alert(string);
$('.marker').css(
{
'left': x +'px',
'top': y +'px'
},{
duration:1000,
})
});
But this only moves the img around the page. I need to add multiple copies and POST to php url.
Thanks!
clone the element.
http://jsfiddle.net/xarGV/