Make sure that mixed case alpha filters are handled correctly in IE. Fixes #5632.
[jquery.git] / src / css.js
index 07ff686..79ae00e 100644 (file)
@@ -1,6 +1,6 @@
 (function( jQuery ) {
 
-var ralpha = /alpha\([^)]*\)/,
+var ralpha = /alpha\([^)]*\)/i,
        ropacity = /opacity=([^)]*)/,
        rdashAlpha = /-([a-z])/ig,
        rupper = /([A-Z])/g,
@@ -20,6 +20,11 @@ var ralpha = /alpha\([^)]*\)/,
        };
 
 jQuery.fn.css = function( name, value ) {
+       // Setting 'undefined' is a no-op
+       if ( arguments.length === 2 && value === undefined ) {
+               return this;
+       }
+
        return jQuery.access( this, name, value, true, function( elem, name, value ) {
                return value !== undefined ?
                        jQuery.style( elem, name, value ) :