Commit 14fa1e85 authored by Brandon Aaron's avatar Brandon Aaron

Small optimization to jQuery.css to save 12 bytes

parent 9c94ef4c
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment