git.asbjorn.biz
/
jquery.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Removing the second capture group. After the changes suggested by Jeff Roberson,...
[jquery.git]
/
src
/
css.js
diff --git
a/src/css.js
b/src/css.js
index
8ea815c
..
69c4452
100644
(file)
--- a/
src/css.js
+++ b/
src/css.js
@@
-64,7
+64,7
@@
jQuery.extend({
}
// Make sure that we're working with the right name
}
// Make sure that we're working with the right name
- var ret, origName = name.replace( rdashAlpha, fcamelCase ),
+ var ret, origName = jQuery.camelCase( name ),
style = elem.style, hooks = jQuery.cssHooks[ origName ];
name = jQuery.cssProps[ origName ] || origName;
style = elem.style, hooks = jQuery.cssHooks[ origName ];
name = jQuery.cssProps[ origName ] || origName;
@@
-94,7
+94,7
@@
jQuery.extend({
css: function( elem, name, extra ) {
// Make sure that we're working with the right name
css: function( elem, name, extra ) {
// Make sure that we're working with the right name
- var ret, origName = name.replace( rdashAlpha, fcamelCase ),
+ var ret, origName = jQuery.camelCase( name ),
hooks = jQuery.cssHooks[ origName ];
name = jQuery.cssProps[ origName ] || origName;
hooks = jQuery.cssHooks[ origName ];
name = jQuery.cssProps[ origName ] || origName;
@@
-125,6
+125,10
@@
jQuery.extend({
for ( name in options ) {
elem.style[ name ] = old[ name ];
}
for ( name in options ) {
elem.style[ name ] = old[ name ];
}
+ },
+
+ camelCase: function( string ) {
+ return string.replace( rdashAlpha, fcamelCase );
}
});
}
});
@@
-151,7
+155,7
@@
jQuery.each(["height", "width"], function( i, name ) {
},
set: function( elem, value ) {
},
set: function( elem, value ) {
- if ( value !== "" ) {
+ if ( rnumpx.test( value ) ) {
// ignore negative width and height values #1599
value = parseFloat(value);
// ignore negative width and height values #1599
value = parseFloat(value);