This is of course because the jquery scripts usually fire before the dom is entirely loaded, or rather, before images have completely loaded. You should probably put the depending scripts in window.onload instead of normal jquery $(document).ready.
sorry if this is obvious and of no help

Andreas

On Jan 12, 2007, at 22:04 , Abel Tamayo wrote:

Ok. I give Up. I need to know the height of certain images in my page to be able to format it and I've tried several workarounds like this function that I call right before my verJustify() function (yeah, a function that lets me justify vertically all divs in my page, just like the plug in):

/**
 * Calculates the height of every image in the selection.
 * Necesary for vertical justifying purposes.
 * Has to be called before verJustify().
 * @see verJustify()
 * @example calHeight("#left");
 * @param string query - The selection to be precalculated
 * @return none
 */
function calHeight(query){
    query = query + " img";
    $(query).each(function(){
      $(this).css("height", $(this).css("height"));
    });
}

The problem with my layout is that basically every image's size is set dinamically when the page loads. Like a liquid layout but instead of using CSS and text, with a lot of images and JavaScript.

My theory was: ok, if Firefox doesn't calculate the width of an image before the formatting of the page, maybe i can force it to do it. It works for some things but not for others and I don't know what else to try. The funny thing is that, in debugging mode, if I set a breakpoint to this function and then just let it execute, it works perfectly, but if I don't pause it manually it seems like there's not enough time to calculate every image's height.


¿Any suggestions?
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

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

Reply via email to