Jump to content

Preloader.


cpugeek

Recommended Posts

Does anyone know of a simple page loader?all i need is a simple preloader that places a image in the center of a page.&& that doesn't allow interaction with the page until the page is fully loaded.in a nutshell: 1) click on a link2) the preloader script shows a picture while loading the page.

Link to comment
Share on other sites

Something like this? The centering of the image on the window, and any other style elements you'd want to add, could all be done with CSS on the "preload" div.

<html><head><style type="text/css">#content { display: none; }</style><script type="text/javascript">function hideLoading(){	document.getElementById("preload").style.display = "none";	document.getElementById("content").style.display = "block";}window.onload = hideLoading;</script></head><body><div id="preload"><img src="loading.gif" /></div><div id="content">  content goes here...</div></body></html>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...