On Thu, Apr 9, 2009 at 1:54 PM, Matt Kruse <[email protected]> wrote:

>
> On Apr 9, 1:42 pm, Brandon Aaron <[email protected]> wrote:
> > Unfortunately it just isn't as simple as that. A positioned body element
> > directly affects how the browser calculates the offsetTop/Left properties
> of
> > child elements.
>
> In what cases? Just curious.
>
> I suppose it depends on the browser and the exact layout/objects in
> question, but I've used this solution several times and it's been
> sufficient for me. It may be enough for the OP.


It has been awhile since I last looked into this issue... so I don't have
specifics off-hand. It usually relates to the border of elements. It is of
course going to depend on your HTML structure and CSS (position, border,
etc). I used to fix some of these issues like border and position on the
body element when offset was a part of the dimensions plugin only. The extra
code, overhead, and maintenance issues it caused was not worth it
considering how edge case this is and that it has such a simple workaround.

If anyone else wants to look into it... feel free to look under
test/data/offset/ in jQuery SVN to find the tests for the offset method. Add
body position to see how it reacts in the different browsers for the
different tests. As I said, it has been a while and perhaps I just missed
something back in the day. Maybe I can find the time to re-evaluate the
issue as well.

--
Brandon Aaron

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to