Shortcut for .offset().top/left.
Hello!
Sometimes I need get offset top and left, I need do:
var offset = $(...).offset();
alert(offset.top);
alert(offset.left);
But it is strange, maybe I can do, simply:
alert($(...).top());
alert($(...).left());
It can help to get offset or relative position, or set.
$(...).top(50); // eq. .css('top', 50);
A boolean can represents "get relative":
alert($(...).top(true)); // eq. $(...).position().top
Bye.