+1  A: 

You might want to set the CSS position of the element to fixed. This will position the element relative to the screen, no matter where the element is defined and how scrolled the page is. This would be done by switching from:

.css({top:evt.pageY, left:evt.pageX})

To:

.css({position:'fixed', top:evt.screenY, left:evt.screenX})
Max Shawabkeh
Thanks for your reply Max S :),I did that already, but it is not that nice as showing the response next to the voting element., isn't it.?
Gaurav Sharma
Well, if the voting element is clicked, then the mouse position will be exactly where the click was, i.e. on/near the image. However, I just noticed that you used pageX/pageY, while for fixed screenX/screenY would make more sense; edited.
Max Shawabkeh
I cannot use the click event to determine the position because to determine the click I have to create a separate ID attribute for every img element generated. :(
Gaurav Sharma
I'm not sure why that would be the case. Since you are capturing a click event on the vote, all you need are that event's attributes. The images are never touched this way.
Max Shawabkeh
:) :) :) :)thanks man your comment gave me an idea.I simply used the find method of jquery to find for every vote element being clicked and displayed the div next to every matched elementthanks a lot.
Gaurav Sharma