Ahh yes, if you use firebug and run the following $('#image-box
img').offset() it returns the correct values. You are getting
incorrect values because you are firing the methods before the image
is loaded *and* you haven't given the image a width and height. The
document.ready function fires as soon as the DOM is ready. Try using
$(window).bind('load', fn) instead and it should provide the correct
results.

The reason it sometimes resolves itself is because it has pulled from
the cache just as quick as the dom ready has been fired.

--
Brandon Aaron

On 2/7/07, Tim McCormack <[EMAIL PROTECTED]> wrote:
> I should add that the dimensioning/positioning problem occurs *most*
> of the time, but will occasionally spontaneously resolve. (Perhaps
> when I hit the back button, or let a page site, etc.) Very odd.
>
>  - Tim
>
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/
>

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

Reply via email to