I ran into a Thickbox problem where the overlay would not grow taller than the content. Perhaps I had an older version, or something about the jQuery library changed between when the version I have was written and version 1.0.3.  I solved it by writing a small function that takes advantage of the dimensions plugin to get the size of the entire page, not just the part visible on screen.  It's not nearly as elegant a solution as Klaus' css fixes, but I thought I'd post it just in case anyone finds it useful.

// get the dimensions of the view port
// minus scroll bar and the entire height
// of either the window, or the content
// whichever is greater.

jQuery.vpDimensions = function(){
    o = jQuery('body').offset();
    return {
        height: Math.max(o.height,$(window).height()),
        width: Math.min(o.width,$(window).width())
    }
}

Which I used to replace the guts of Thickbox's TB_overlaySize function with...

vp = $.vpDimensions();
$("#TB_overlay,#TB_HideSelect").css({"height":vp.height+"px", "width":vp.width+"px"});


However, I'll get rid of this and implement your fix Klaus, as soon as you post a link to your blog post. Thanks for the tip.

Paul

PS - Klaus, don't forget to apply your fix to the #TB_HideSelect element as well. I believe they should be the same size and stacked on top of each other.
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to