| 5444 | }); |
| 5445 | |
| 5446 | function getElementStyles( elem ) { |
| 5447 | var key, len, |
| 5448 | style = elem.ownerDocument.defaultView ? |
| 5449 | elem.ownerDocument.defaultView.getComputedStyle( elem, null ) : |
| 5450 | elem.currentStyle, |
| 5451 | styles = {}; |
| 5452 | |
| 5453 | if ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) { |
| 5454 | len = style.length; |
| 5455 | while ( len-- ) { |
| 5456 | key = style[ len ]; |
| 5457 | if ( typeof style[ key ] === "string" ) { |
| 5458 | styles[ $.camelCase( key ) ] = style[ key ]; |
| 5459 | } |
| 5460 | } |
| 5461 | // support: Opera, IE <9 |
| 5462 | } else { |
| 5463 | for ( key in style ) { |
| 5464 | if ( typeof style[ key ] === "string" ) { |
| 5465 | styles[ key ] = style[ key ]; |
| 5466 | } |
| 5467 | } |
| 5468 | } |
| 5469 | |
| 5470 | return styles; |
| 5471 | } |
| 5472 | |
| 5473 | |
| 5474 | function styleDifference( oldStyle, newStyle ) { |