You need to get the mouse coordinates and make your script use them to position the popover on click. If you're using jQuery this might help:
$('#yourimage').click(function(){
$('#popover').css('left', pageX-(popover width)+'px');
$('#popover').css('top', pageY-(popover height)+'px');
})
---EDIT---
Here's a demo of what you're after.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…