Xavier Xavier - 2 years ago 383
Javascript Question

get right position of Element? jQuery or javascript

I wish to get the right position of an element in jquery, i have tried

, and i have read the API document regarding
which is non existent (i believe).


Is an example i wish to alert the right value for.

Answer Source

You want to find the value of the CSS right property?


In plain Javascript:


But, if you want to find the calculated distance from the right edge of an element to the right edge of another one, then you'll have to do that yourself, combining .position().left and .offsetWidth

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download