diff options
Diffstat (limited to 'ui/effect.js')
-rw-r--r-- | ui/effect.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ui/effect.js b/ui/effect.js index 31e6024a1..2d17affd1 100644 --- a/ui/effect.js +++ b/ui/effect.js @@ -746,6 +746,12 @@ $.each( } ); +function camelCase( string ) { + return string.replace( /-([\da-z])/gi, function( all, letter ) { + return letter.toUpperCase(); + } ); +} + function getElementStyles( elem ) { var key, len, style = elem.ownerDocument.defaultView ? @@ -758,7 +764,7 @@ function getElementStyles( elem ) { while ( len-- ) { key = style[ len ]; if ( typeof style[ key ] === "string" ) { - styles[ $.camelCase( key ) ] = style[ key ]; + styles[ camelCase( key ) ] = style[ key ]; } } |