aboutsummaryrefslogtreecommitdiffstats
path: root/src/css.js
diff options
context:
space:
mode:
authorColin Snover <colin@alpha.zetafleet.com>2010-10-09 10:42:01 -0400
committerjeresig <jeresig@gmail.com>2010-10-09 10:42:01 -0400
commit2ca36598954759c5b5dce569a39c52b981ed4ab2 (patch)
tree495e310ac7e5ecbac1caa5fee7247a010cb21dcf /src/css.js
parenta2aefbf3b198620ae45d2451d21cc5bf96258a7d (diff)
downloadjquery-2ca36598954759c5b5dce569a39c52b981ed4ab2.tar.gz
jquery-2ca36598954759c5b5dce569a39c52b981ed4ab2.zip
Prevent IE from throwing errors when setting RGBA values. Fixes #5509.
Diffstat (limited to 'src/css.js')
-rw-r--r--src/css.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/css.js b/src/css.js
index 4bf818e5a..99cb73581 100644
--- a/src/css.js
+++ b/src/css.js
@@ -88,7 +88,11 @@ jQuery.extend({
// If a hook was provided, use that value, otherwise just set the specified value
if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value )) !== undefined ) {
- style[ name ] = value;
+ // Wrapped to prevent IE from throwing errors when 'invalid' values are provided
+ // Fixes bug #5509
+ try {
+ style[ name ] = value;
+ } catch(e) {}
}
} else {