( elem, name, computed )
| 5520 | |
| 5521 | |
| 5522 | function curCSS( elem, name, computed ) { |
| 5523 | var width, minWidth, maxWidth, ret, |
| 5524 | style = elem.style; |
| 5525 | |
| 5526 | computed = computed || getStyles( elem ); |
| 5527 | |
| 5528 | // Support: IE9 |
| 5529 | // getPropertyValue is only needed for .css('filter') in IE9, see #12537 |
| 5530 | if ( computed ) { |
| 5531 | ret = computed.getPropertyValue( name ) || computed[ name ]; |
| 5532 | } |
| 5533 | |
| 5534 | if ( computed ) { |
| 5535 | |
| 5536 | if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) { |
| 5537 | ret = jQuery.style( elem, name ); |
| 5538 | } |
| 5539 | |
| 5540 | // Support: iOS < 6 |
| 5541 | // A tribute to the "awesome hack by Dean Edwards" |
| 5542 | // iOS < 6 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels |
| 5543 | // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values |
| 5544 | if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) { |
| 5545 | |
| 5546 | // Remember the original values |
| 5547 | width = style.width; |
| 5548 | minWidth = style.minWidth; |
| 5549 | maxWidth = style.maxWidth; |
| 5550 | |
| 5551 | // Put in the new values to get a computed value out |
| 5552 | style.minWidth = style.maxWidth = style.width = ret; |
| 5553 | ret = computed.width; |
| 5554 | |
| 5555 | // Revert the changed values |
| 5556 | style.width = width; |
| 5557 | style.minWidth = minWidth; |
| 5558 | style.maxWidth = maxWidth; |
| 5559 | } |
| 5560 | } |
| 5561 | |
| 5562 | return ret !== undefined ? |
| 5563 | // Support: IE |
| 5564 | // IE returns zIndex value as an integer. |
| 5565 | ret + "" : |
| 5566 | ret; |
| 5567 | } |
| 5568 | |
| 5569 | |
| 5570 | function addGetHookIf( conditionFn, hookFn ) { |
no test coverage detected