I’m trying to place a div wherever the cursor is when the mouse is clicked. So when I use e.PageX and e.pageY, it’s actually placing my div far lower than intended. Any ideas?
var mouseX = e.pageX;
var mouseY = e.pageY;
$("#moverdiv").css({'top':mouseY,'left':mouseX});
This Worked for me.Try this:
And this is the demo