File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,12 @@ domEqual.attributes = [
5959 "title"
6060] ;
6161
62+ function camelCase ( string ) {
63+ return string . replace ( / - ( [ \d a - z ] ) / gi, function ( all , letter ) {
64+ return letter . toUpperCase ( ) ;
65+ } ) ;
66+ }
67+
6268function getElementStyles ( elem ) {
6369 var styles = { } ;
6470 var style = elem . ownerDocument . defaultView ?
@@ -71,7 +77,7 @@ function getElementStyles( elem ) {
7177 while ( len -- ) {
7278 key = style [ len ] ;
7379 if ( typeof style [ key ] === "string" ) {
74- styles [ $ . camelCase ( key ) ] = style [ key ] ;
80+ styles [ camelCase ( key ) ] = style [ key ] ;
7581 }
7682 }
7783
Original file line number Diff line number Diff line change @@ -746,6 +746,12 @@ $.each(
746746 }
747747) ;
748748
749+ function camelCase ( string ) {
750+ return string . replace ( / - ( [ \d a - z ] ) / gi, function ( all , letter ) {
751+ return letter . toUpperCase ( ) ;
752+ } ) ;
753+ }
754+
749755function getElementStyles ( elem ) {
750756 var key , len ,
751757 style = elem . ownerDocument . defaultView ?
@@ -758,7 +764,7 @@ function getElementStyles( elem ) {
758764 while ( len -- ) {
759765 key = style [ len ] ;
760766 if ( typeof style [ key ] === "string" ) {
761- styles [ $ . camelCase ( key ) ] = style [ key ] ;
767+ styles [ camelCase ( key ) ] = style [ key ] ;
762768 }
763769 }
764770
You can’t perform that action at this time.
0 commit comments