May 18, 2012
Javascript event after the dom is ready but not rendered
Question by rematnarab
Is it possible to do something after the dom is ready but it is not rendered(White screen)
I would like to hide the contents from user and after some operations i would like to show the final picture.
I could use “display:none” on my body tag but i am working on a huge project so i dont want to change every page.
Thanks
Answer by Starx
Here is how?
document.onload = fucntion() {
//your codes
}
Unlike, window.onload
this function runs after the DOM is loaded, so the manipulation is possible, but it does not require all the elements to be rendered.