- var ret = "0px",
- display = elem.style.display;
- elem.style.display = "inline-block";
- ret = getComputedStyle( elem, "margin-right", "margin-right" );
- elem.style.display = display;
+ var ret;
+ jQuery.swap( elem, { "display": "inline-block" }, function() {
+ if ( computed ) {
+ ret = curCSS( elem, "margin-right", "marginRight" );
+ } else {
+ ret = elem.style.marginRight;
+ }
+ });