Commit ee81d4da authored by jeresig's avatar jeresig

Merge branch 'bug-3333' of https://github.com/rdworth/jquery

parents 23e8cc56 735a949a
...@@ -248,11 +248,14 @@ jQuery(function() { ...@@ -248,11 +248,14 @@ jQuery(function() {
get: function( elem, computed ) { get: function( elem, computed ) {
// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
// Work around by temporarily setting element display to inline-block // Work around by temporarily setting element display to inline-block
var ret = "0px", var ret;
display = elem.style.display; jQuery.swap( elem, { "display": "inline-block" }, function() {
elem.style.display = "inline-block"; if ( computed ) {
ret = getComputedStyle( elem, "margin-right", "margin-right" ); ret = curCSS( elem, "margin-right", "marginRight" );
elem.style.display = display; } else {
ret = elem.style.marginRight;
}
});
return ret; return ret;
} }
}; };
......
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