Skip to main content

Bug Tracker

Side navigation

Ticket #4461: css-array-support.patch
File css-array-support.patch, 0.6 KB (added by dantman, March 31, 2009 05:53PM UTC)

Patch to add support for the enhancment

Index: src/css.js
===================================================================
--- src/css.js	(revision 6300)
+++ src/css.js	(working copy)
@@ -24,6 +24,13 @@
 			options = {};
 			options[ name ] = value;
 		}
+	} else if ( jQuery.isArray( name ) ) {
+		if( !this.length ) return null;
+		var node = this[0], o = {};
+		jQuery.each( name, function(){
+			o[this] = jQuery.css( node, this );
+		});
+		return o;
 	}
 
 	// For each element...
@@ -202,4 +209,4 @@
 		for ( var name in options )
 			elem.style[ name ] = old[ name ];
 	}
-});
\ No newline at end of file
+});

Download in other formats:

Original Format