So I've been thinking about this and it is actually somewhat of an ambiguous use-case. Most things in HTML/CSS are usually considered from their left most and top most sides (bounding box) when thinking of position/dimensions. However, I see the reasoning and desire to handle this inline element differently. Unfortunately the solution isn't very simple and doesn't translate well to the offset and position methods. In other words, offset and position are strictly for calculating the bounding pox position. For this particular use-case of knowing where the text begins within the bounding box you'll need to use the workaround you suggested.
-- Brandon Aaron On Fri, Aug 28, 2009 at 10:51 AM, Nikola<gavin.b.ly...@gmail.com> wrote: > > Hello, > > I believe I may have found an issue with the position() method. > > When getting an element.position().left property using jQuery, if a > link is long enough that it wraps down to another line, the property > will be thrown off. Instead of getting the left of where the link > itself starts, it will instead get the left of the position where the > bounding rectangle of the entire link would end up. > > example here: > http://gavinlynch.name/algorithms/javascript/link_position.html > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to jquery-dev@googlegroups.com To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~----------~----~----~----~------~----~------~--~---