File tree 2 files changed +14
-2
lines changed
2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,12 @@ domEqual.attributes = [
59
59
"title"
60
60
] ;
61
61
62
+ function camelCase ( string ) {
63
+ return string . replace ( / - ( [ \d a - z ] ) / gi, function ( all , letter ) {
64
+ return letter . toUpperCase ( ) ;
65
+ } ) ;
66
+ }
67
+
62
68
function getElementStyles ( elem ) {
63
69
var styles = { } ;
64
70
var style = elem . ownerDocument . defaultView ?
@@ -71,7 +77,7 @@ function getElementStyles( elem ) {
71
77
while ( len -- ) {
72
78
key = style [ len ] ;
73
79
if ( typeof style [ key ] === "string" ) {
74
- styles [ $ . camelCase ( key ) ] = style [ key ] ;
80
+ styles [ camelCase ( key ) ] = style [ key ] ;
75
81
}
76
82
}
77
83
Original file line number Diff line number Diff line change @@ -746,6 +746,12 @@ $.each(
746
746
}
747
747
) ;
748
748
749
+ function camelCase ( string ) {
750
+ return string . replace ( / - ( [ \d a - z ] ) / gi, function ( all , letter ) {
751
+ return letter . toUpperCase ( ) ;
752
+ } ) ;
753
+ }
754
+
749
755
function getElementStyles ( elem ) {
750
756
var key , len ,
751
757
style = elem . ownerDocument . defaultView ?
@@ -758,7 +764,7 @@ function getElementStyles( elem ) {
758
764
while ( len -- ) {
759
765
key = style [ len ] ;
760
766
if ( typeof style [ key ] === "string" ) {
761
- styles [ $ . camelCase ( key ) ] = style [ key ] ;
767
+ styles [ camelCase ( key ) ] = style [ key ] ;
762
768
}
763
769
}
764
770
You can’t perform that action at this time.
0 commit comments