| 3301 | }); |
| 3302 | |
| 3303 | function getElementStyles( elem ) { |
| 3304 | var key, len, |
| 3305 | style = elem.ownerDocument.defaultView ? |
| 3306 | elem.ownerDocument.defaultView.getComputedStyle( elem, null ) : |
| 3307 | elem.currentStyle, |
| 3308 | styles = {}; |
| 3309 | |
| 3310 | if ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) { |
| 3311 | len = style.length; |
| 3312 | while ( len-- ) { |
| 3313 | key = style[ len ]; |
| 3314 | if ( typeof style[ key ] === "string" ) { |
| 3315 | styles[ $.camelCase( key ) ] = style[ key ]; |
| 3316 | } |
| 3317 | } |
| 3318 | // support: Opera, IE <9 |
| 3319 | } else { |
| 3320 | for ( key in style ) { |
| 3321 | if ( typeof style[ key ] === "string" ) { |
| 3322 | styles[ key ] = style[ key ]; |
| 3323 | } |
| 3324 | } |
| 3325 | } |
| 3326 | |
| 3327 | return styles; |
| 3328 | } |
| 3329 | |
| 3330 | |
| 3331 | function styleDifference( oldStyle, newStyle ) { |