X-Git-Url: http://git.asbjorn.biz/?p=jquery.git;a=blobdiff_plain;f=src%2Fcss.js;h=99cb73581cd4430aeeb8bd2696b364514e0f849d;hp=4bf818e5abeae651d2ee0c24e6f9fd6645cb7fad;hb=2ca36598954759c5b5dce569a39c52b981ed4ab2;hpb=a2aefbf3b198620ae45d2451d21cc5bf96258a7d diff --git a/src/css.js b/src/css.js index 4bf818e..99cb735 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 {