aboutsummaryrefslogtreecommitdiffstats
path: root/src/css.js
diff options
context:
space:
mode:
authorBrandon Aaron <brandon.aaron@gmail.com>2009-05-14 14:44:31 +0000
committerBrandon Aaron <brandon.aaron@gmail.com>2009-05-14 14:44:31 +0000
commitec3ebd3e8a7dfda15d227ea3dd21361e534beac3 (patch)
treeeb86118bd6010bffedec2166eacb89e1298d9449 /src/css.js
parentb763cc6602fdf2bede16be5bf106ceaa1d1d0525 (diff)
downloadjquery-ec3ebd3e8a7dfda15d227ea3dd21361e534beac3.tar.gz
jquery-ec3ebd3e8a7dfda15d227ea3dd21361e534beac3.zip
opacity is now retrieved from stylesheet in IE. fixes #3981
Diffstat (limited to 'src/css.js')
-rw-r--r--src/css.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/css.js b/src/css.js
index f77497b4f..12f9d514e 100644
--- a/src/css.js
+++ b/src/css.js
@@ -120,12 +120,18 @@ jQuery.extend({
},
curCSS: function( elem, name, force ) {
- var ret, style = elem.style;
+ var ret, style = elem.style, filter;
// IE uses filters for opacity
if ( !jQuery.support.opacity && name == "opacity" ) {
- ret = style.filter && style.filter.indexOf("opacity=") >= 0 ?
- (parseFloat( style.filter.match(/opacity=([^)]*)/)[1] ) / 100) + '':
+ filter = (filter = style.filter) && filter.indexOf("opacity=") >= 0 ?
+ filter :
+ (filter = elem.currentStyle[ 'filter' ]) && filter.indexOf("opacity=") >= 0 ?
+ filter :
+ null;
+
+ ret = filter && filter.indexOf("opacity=") >= 0 ?
+ (parseFloat( filter.match(/opacity=([^)]*)/)[1] ) / 100) + '':
"";
return ret === "" ?