Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
scottjehl committed Aug 30, 2010
1 parent 2b3f336 commit 162cfd0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions media query check - media.matchMedium.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ if ( !(window.media && media.matchMedium) ){
if (cache[q] === undefined) {
var styleBlock = doc.createElement('style');
styleBlock.type = 'text/css';
var cssrule = '@media '+q+' { #ejs-qtest { position: absolute; width: 10px; } }';
var cssrule = '@media '+q+' { #ejs-qtest { position: absolute; } }';
if (styleBlock.styleSheet){
styleBlock.styleSheet.cssText = cssrule;
}
Expand All @@ -41,7 +41,7 @@ if ( !(window.media && media.matchMedium) ){
}
docElem.insertBefore(fakeBody, docElem.firstChild);
docElem.insertBefore(styleBlock, docElem.firstChild);
cache[q] = (testDiv.offsetWidth == 10);
cache[q] = ((window.getComputedStyle ? window.getComputedStyle(testDiv,null) : testDiv.currentStyle)['position'] == 'absolute');
docElem.removeChild(fakeBody);
docElem.removeChild(styleBlock);
}
Expand Down

0 comments on commit 162cfd0

Please sign in to comment.