This is probably a really simple question, but how do I go about getting the right offset of an element in jQuery?
I can do:
$("#whatever").offset().left;
and it is valid.
But it seems that:
$("#whatever").offset().right
is undefined.
So how does one accomplish this in jQuery?
Thanks!!
Alex, Gary:
As requested, here is my comment posted as an answer:
var rt = ($(window).width() - ($whatever.offset().left + $whatever.outerWidth()));
Thanks for letting me know.
In pseudo code that can be expressed as:
The right offset is:
The window's width MINUS
( The element's left offset PLUS the element's outer width )