Search code examples
javascriptjqueryhtmlcssmouse-coordinates

position to mouse co ordinates after scrolling body


If i am positioning a child div in accordance with the mouse co-ordinates inside a parent div, without scrolling the body, the child is being positioned properly. Now if a scroll the body such that the parent div is just visible, and now click on the parent, to position the child, the child is not being positioned. please suggest a way such that i will be able to position the child even after scrolling the body. Please find the same case in this Fiddle.Thanks in advance


Solution

  • Thanks all. My problem got solved with e.pageY See the following working Fiddle