aboutsummaryrefslogtreecommitdiffstats
path: root/src/css
diff options
context:
space:
mode:
authorGeorge Kats <katsgeorgeek@gmail.com>2013-10-06 19:53:26 +0300
committerRichard Gibson <richard.gibson@gmail.com>2013-10-15 13:58:06 -0400
commit32d61d75e575465bca2b4aa721ed39dd147e21c7 (patch)
treefe0f54650019812686008d88fcf7f649ce86535a /src/css
parent62900a9edbb5bb1f89916ff04cecd421b3f6f6e5 (diff)
downloadjquery-32d61d75e575465bca2b4aa721ed39dd147e21c7.tar.gz
jquery-32d61d75e575465bca2b4aa721ed39dd147e21c7.zip
Fix #14432: Always return string from .css("z-index"). Close gh-1395.
(cherry picked from commit 5ce4b06c285bd8cf52eaff0f39e0b9192a927873) Conflicts: src/css/curCSS.js
Diffstat (limited to 'src/css')
-rw-r--r--src/css/curCSS.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/css/curCSS.js b/src/css/curCSS.js
index e09574530..1af1812cd 100644
--- a/src/css/curCSS.js
+++ b/src/css/curCSS.js
@@ -51,7 +51,9 @@ if ( window.getComputedStyle ) {
}
}
- return ret;
+ // Support: IE
+ // IE returns zIndex value as an integer.
+ return ret === undefined ? ret : ret + "";
};
} else if ( document.documentElement.currentStyle ) {
getStyles = function( elem ) {
@@ -99,7 +101,11 @@ if ( window.getComputedStyle ) {
}
}
- return ret === "" ? "auto" : ret;
+ return ret === "" ? "auto" :
+ // Support: IE
+ // IE returns zIndex value as an integer.
+ ret === undefined ? ret :
+ ret + "";
};
}