On 2/7/07, Brandon Aaron <[EMAIL PROTECTED]> wrote:
> 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.*smacks forehead* Of course. I'll have to use a combination of DOM polling and $(document).ready -- there's a fair amount of graphics content on the page this will be plugged into. Thanks again! _______________________________________________ jQuery mailing list [email protected] http://jquery.com/discuss/
