Created
November 18, 2010 16:33
-
-
Save furf/705239 to your computer and use it in GitHub Desktop.
Deferred document.write
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function (document, $) { | |
document.write = function (text) { | |
var elem = $('script').last(); | |
$(function () { | |
$('<div>').html(text).insertBefore(elem); | |
}); | |
}; | |
})(this.document, this.jQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment