Possible Duplicate:
JavaScript - controlling the insertion point for document.write
I want to delay document.write
if block with document.write
not in the viewport of browser.
I tried to make it after window loaded, but document.write
replaces the whole content :(
$(function(){
document.write('bla')
)}
Also, in this document.write
I have script with ads and it must work when added in block.
Is it possible?
UPD: i have code whith document.write
, which pushes in document <script>
. so, because of this code my page loads very slowly and i want to load this script only when dom is ready or when user srolls to the block where my ads placed