John Resig schrieb:
>> If I change line 943:
>>
>> jQuery.swap( e, { visibility: "hidden", position: "absolute", display:
>> "block" },
>>
>> to this:
>>
>> jQuery.swap( e, { display: "block" },
> 
> That code is in place to stop the "flash of content" that can occur
> when determining the true height of the element. Unfortunately, it
> seems that it has trouble with content whose width/height is 'auto'
> and located within a confined  container.
> 
> One quick thing about your demo page - you have some PHP at the top of
> your jquery.js file which causes issues in Opera, etc.
> 
> I'll see if I can get a demo up of my page, that works, without that
> particular change.


John, in the latest Revision (234) I had to change this:

jQuery.swap( e, old, function() {
     if (jQuery.css(e,"display") != "none") {
        oHeight = e.offsetHeight;
        oWidth = e.offsetWidth;
     } else {
        e = $(e.cloneNode(true)).css({
                visibility: "hidden", position: "absolute", display: "block"
        }).prependTo("body")[0];

        oHeight = e.clientHeight;
        oWidth = e.clientWidth;
        
        e.parentNode.removeChild(e);
     }
});


to this to make it work again:


jQuery.swap( e, old, function() {
     if (jQuery.css(e,"display") != "none") {
        oHeight = e.offsetHeight;
        oWidth = e.offsetWidth;
     } else {
        e = $(e.cloneNode(true)).css({
                visibility: "hidden", position: "static", display: "block"
        }).prependTo(e.parentNode)[0];
        oHeight = e.clientHeight;
        oWidth = e.clientWidth;
        
        e.parentNode.removeChild(e);
     }
});


position: "absolute" becomes position: "static", prependTo("body")[0] 
becomes prependTo(e.parentNode)[0]


-- Klaus



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

Reply via email to