jQuery setTimeout

In: JavaScript, jQuery on 22.07.2010 by Dejan Jacimovic
In order to make certain jQuery function run after some amount of time, you can use setTimeout - a JavaScript function. Here is a snippet that will remove loading mask from your page, one second after a website was loaded.
jQuery(document).ready(function () {
	setTimeout( function() {
		jQuery('#loading_mask').hide();
	}, 1000 );
});
Note: You can setup loading mask to cover your whole website, or just some part (image gallery for example). This way you can achieve nice effect so user won't see loading images.