Prevent IE from throwing errors when setting RGBA values. Fixes #5509.
This commit is contained in:
parent
a2aefbf3b1
commit
2ca3659895
2 changed files with 16 additions and 2 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue