MCPcopy Index your code
hub / github.com/JsAaron/jQuery / curCSS

Function curCSS

2.1.1/test/other.js:2928–2973  ·  view source on GitHub ↗
( elem, name, computed )

Source from the content-addressed store, hash-verified

2926
2927
2928function curCSS( elem, name, computed ) {
2929 var width, minWidth, maxWidth, ret,
2930 style = elem.style;
2931
2932 computed = computed || getStyles( elem );
2933
2934 // Support: IE9
2935 // getPropertyValue is only needed for .css('filter') in IE9, see #12537
2936 if ( computed ) {
2937 ret = computed.getPropertyValue( name ) || computed[ name ];
2938 }
2939
2940 if ( computed ) {
2941
2942 if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {
2943 ret = jQuery.style( elem, name );
2944 }
2945
2946 // Support: iOS < 6
2947 // A tribute to the "awesome hack by Dean Edwards"
2948 // iOS < 6 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels
2949 // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values
2950 if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) {
2951
2952 // Remember the original values
2953 width = style.width;
2954 minWidth = style.minWidth;
2955 maxWidth = style.maxWidth;
2956
2957 // Put in the new values to get a computed value out
2958 style.minWidth = style.maxWidth = style.width = ret;
2959 ret = computed.width;
2960
2961 // Revert the changed values
2962 style.width = width;
2963 style.minWidth = minWidth;
2964 style.maxWidth = maxWidth;
2965 }
2966 }
2967
2968 return ret !== undefined ?
2969 // Support: IE
2970 // IE returns zIndex value as an integer.
2971 ret + "" :
2972 ret;
2973}
2974
2975
2976function addGetHookIf( conditionFn, hookFn ) {

Callers 11

getWidthOrHeightFunction · 0.70
jquery-1.11.1.jsFile · 0.70
getWidthOrHeightFunction · 0.70
other.jsFile · 0.70
css.jsFile · 0.50
css.jsFile · 0.50
getWHFunction · 0.50
Css.jsFile · 0.50
getWidthOrHeightFunction · 0.50
2.0.3.jsFile · 0.50
getWidthOrHeightFunction · 0.50

Calls 1

getStylesFunction · 0.70

Tested by

no test coverage detected