I have a DIV and I can get the offset using .offset ().
But I'm trying to get the mouse position associated with the div. When I find the DIV, I can get the x and y offsets of the mouse. But they will be calculated in accordance with the document. But it should be calculated below.
For example DIV dimensions are 200 and 200.
then it should calculate offsets related to (0,200)(200,0),(200,200),(200,200).
Please help me with this. How can i do this.
source
share