<img src="foto.jpg" data-id="100" class="foto">

$("body").on("dblclick",".foto",function(){

var url = "post.php";
var data = $(this).attr("data-id");
$.post(url, data, function(response){
alert(response);
});
});