coolispaul
asked on
Jquery get X and Y coordfinates of an elemnet within a DIV
Hi
I have a container element of 980px. I want to find the x and y coordinates of an element within that container element.
Im using .position() .
This retrieves the coordinates in relation to the whole viewport. How can i get the coordinates in relation to the container eleemnt?
Thanks
I have a container element of 980px. I want to find the x and y coordinates of an element within that container element.
Im using .position() .
This retrieves the coordinates in relation to the whole viewport. How can i get the coordinates in relation to the container eleemnt?
Thanks
I think you want offset http://api.jquery.com/offset/
ASKER
hmm i tried that but where do you tell it watch element to offset it against?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Can you give a bit more info on what the solution was here.
A B grade means the solution given lacked some information or required you to do a good amount of extra work to resolve the problem. When closing the question, the asker should explain why a B grade was awarded.