X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjquery%2Fjquery.js;h=715fbf11016255869b0e686ffa0d17cc14a12432;hb=14fa1e858c91cbb354009bc68fbd893ed4ff540c;hp=910c11b21a28c64aae2459b71e3805d9d8111afc;hpb=ae208246fbd1708b72e822b61c9e24d3034d1a05;p=jquery.git diff --git a/src/jquery/jquery.js b/src/jquery/jquery.js index 910c11b..715fbf1 100644 --- a/src/jquery/jquery.js +++ b/src/jquery/jquery.js @@ -1373,7 +1373,7 @@ jQuery.extend({ }); jQuery.swap( e, old, function() { - if (jQuery.css(e,"display") != "none") { + if ( jQuery(e).is(':visible') ) { oHeight = e.offsetHeight; oWidth = e.offsetWidth; } else { @@ -1383,14 +1383,14 @@ jQuery.extend({ visibility: "hidden", position: "absolute", display: "block", right: "0", left: "0" }).appendTo(e.parentNode)[0]; - var parPos = jQuery.css(e.parentNode,"position"); - if ( parPos == "" || parPos == "static" ) + var parPos = jQuery.css(e.parentNode,"position") || "static"; + if ( parPos == "static" ) e.parentNode.style.position = "relative"; oHeight = e.clientHeight; oWidth = e.clientWidth; - if ( parPos == "" || parPos == "static" ) + if ( parPos == "static" ) e.parentNode.style.position = "static"; e.parentNode.removeChild(e); @@ -1626,9 +1626,10 @@ jQuery.extend({ * @cat JavaScript */ merge: function(first, second) { - for ( var i = 0, sl = second.length; i < sl; i++ ) + // We have to loop this way because IE & Opera overwrite the length + // expando of getElementsByTagName + for ( var i = 0; second[i]; i++ ) first.push(second[i]); - return first; },