Brandon Aaron schrieb:
> I was also thinking about taking a hash of top and left as a param.
> The top and left would be numbers to relatively offset the element by.
> This sounds like what you are talking about and would remove the
> annoyance of the + 'px' all over the place. However, the call would
> look like this: $().offset({ top: 10, left: 10 }); I guess that is
> less typing than: $().top(10+'px').left(10+'px');

What about using 'px' as default unit? That way you could write:
$().top(10).left(10) - and the 'px' is added automatically. In case a 
string is passed you would take that value as is: 
$().top('10%').left('10%').

-- Klaus



_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to