I'm not entirely sure what you're looking for hear but my best guess is that you want to use the answer from that question you linked as a loading image in front of a website and you want the image to fade out and the website to fade in after a specified length of time.
To perform an action after a specified length of time you use
setTimeout(function, duration)
Documentation on setTimeout
To hide/show the image/website respectively you can use something like this:
function(){
document.getElementById("content").style.display = "block";
document.getElementById("loading").style.display = "none";
}
Then you combine them into this:
setTimeout(function() {
document.getElementById("content").style.display = "block";
document.getElementById("loading").style.display = "none";
}, 4000);
You can also jQuery to be able to animate the transition:
setTimeout(function() {
$("#content").show(1000);
$("#loading").hide(1000);
}, 4000);
And here's a jsFiddle that demonstrates that it works.