diff --git a/src/css.js b/src/css.js index 86399aa51..f2c0473dd 100644 --- a/src/css.js +++ b/src/css.js @@ -291,7 +291,7 @@ jQuery.extend({ // because jsdom on node.js will break without it. if ( window.getComputedStyle ) { getStyles = function( elem ) { - return window.getComputedStyle( elem, null ); + return elem.ownerDocument.defaultView.getComputedStyle( elem, null ); }; curCSS = function( elem, name, _computed ) {