a1a3bc73
Luigi Serra
graphs updates
|
1
|
define( [
|
74249687
Luigi Serra
Cross browser con...
|
2
3
4
5
|
"../core",
"./var/rnumnonpx",
"./var/rmargin",
"./var/getStyles",
|
a1a3bc73
Luigi Serra
graphs updates
|
6
7
8
|
"./support",
"../selector" // Get jQuery.contains
], function( jQuery, rnumnonpx, rmargin, getStyles, support ) {
|
74249687
Luigi Serra
Cross browser con...
|
9
10
11
12
13
14
15
16
17
18
19
|
function curCSS( elem, name, computed ) {
var width, minWidth, maxWidth, ret,
style = elem.style;
computed = computed || getStyles( elem );
// Support: IE9
// getPropertyValue is only needed for .css('filter') (#12537)
if ( computed ) {
ret = computed.getPropertyValue( name ) || computed[ name ];
|
74249687
Luigi Serra
Cross browser con...
|
20
21
22
23
24
|
if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {
ret = jQuery.style( elem, name );
}
|
74249687
Luigi Serra
Cross browser con...
|
25
|
// A tribute to the "awesome hack by Dean Edwards"
|
a1a3bc73
Luigi Serra
graphs updates
|
26
27
28
29
30
|
// Android Browser returns percentage for some values,
// but width seems to be reliably pixels.
// This is against the CSSOM draft spec:
// http://dev.w3.org/csswg/cssom/#resolved-values
if ( !support.pixelMarginRight() && rnumnonpx.test( ret ) && rmargin.test( name ) ) {
|
74249687
Luigi Serra
Cross browser con...
|
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
// Remember the original values
width = style.width;
minWidth = style.minWidth;
maxWidth = style.maxWidth;
// Put in the new values to get a computed value out
style.minWidth = style.maxWidth = style.width = ret;
ret = computed.width;
// Revert the changed values
style.width = width;
style.minWidth = minWidth;
style.maxWidth = maxWidth;
}
}
return ret !== undefined ?
|
a1a3bc73
Luigi Serra
graphs updates
|
49
50
|
// Support: IE9-11+
|
74249687
Luigi Serra
Cross browser con...
|
51
52
53
54
55
56
|
// IE returns zIndex value as an integer.
ret + "" :
ret;
}
return curCSS;
|
a1a3bc73
Luigi Serra
graphs updates
|
57
|
} );
|