show loading screen/spinner

show loading screen/spinner

Guys,
 
I am using jquery to hide few elements on a page. When the server is slow, the page loads and shows all the elements and it take few seconds to unhide the elements on the page. The users kind of get a view of the hidden elements.
 
I was wondering if I could show a splash screen or loading spinner and after the elements get hidden show the actual page.
 
Can someone provide me with sample code or examples...
 
thanks in advance.