Skip to content
Browse files

Removed use of documentFragment to fix IE7 child selector (>) bug.

  • Loading branch information...
1 parent 625d77d commit 64823e73f7469152998b2cc35cdfb9d6a56645bd Kyle Robertson committed
Showing with 3 additions and 5 deletions.
  1. +3 −5 respond.src.js
View
8 respond.src.js
@@ -137,7 +137,6 @@
docElemProp = docElem[ name ],
currWidth = doc.compatMode === "CSS1Compat" && docElemProp || doc.body[ name ] || docElemProp,
styleBlocks = {},
- dFrag = doc.createDocumentFragment(),
lastLink = links[ links.length-1 ],
now = (new Date()).getTime();
@@ -177,6 +176,9 @@
ss.type = "text/css";
ss.media = i;
+
+ //append to DOM first for IE7
+ head.insertBefore( ss, lastLink.nextSibling );
if ( ss.styleSheet ){
ss.styleSheet.cssText = css;
@@ -184,12 +186,8 @@
else {
ss.appendChild( doc.createTextNode( css ) );
}
- dFrag.appendChild( ss );
appendedEls.push( ss );
}
-
- //append to DOM at once
- head.insertBefore( dFrag, lastLink.nextSibling );
},
//tweaked Ajax functions from Quirksmode
ajax = function( url, callback ) {

0 comments on commit 64823e7

Please sign in to comment.
Something went wrong with that request. Please try again.