Permalink
Browse files

No commit message

  • Loading branch information...
1 parent 4ebcc99 commit d666ba47356614cf70526a442304521097c2936b Scott Jehl committed Jan 19, 2011
Showing with 4 additions and 2 deletions.
  1. +4 −2 matchMedia.js
View
@@ -25,8 +25,10 @@ if ( !(window.matchMedia) ){
return function(q){
if (cache[q] === undefined) {
- var styleBlock = doc.createElement('style');
- var cssrule = '@media '+q+' { #ejs-qtest { position: absolute; } }';
+ var styleBlock = doc.createElement('style'),
+ cssrule = '@media '+q+' { #ejs-qtest { position: absolute; } }';
+ //must set type for IE!
+ styleBlock.type = "text/css";
if (styleBlock.styleSheet){
styleBlock.styleSheet.cssText = cssrule;
// IE8 does not seem to support the styleSheet property nor appendChild with style elements:

0 comments on commit d666ba4

Please sign in to comment.