php - How to preload a document and presenting it on screen only when the browser finish loading data from server -


is there way of presenting on screen @ same time when document, dom, images, ajax's calls, objects , other stuff finished loading?

that instead of showing them "in-parts" browser gets information server.

any solution useful.

set display:none; until jquery ajax success() method fires, can set display properties normal.

also, make sure ajax code inside of window.onload or $(window).on('load') handler.

the downside of if ajax call unsuccessful, page not display, should define ajax error() method in jquery.

edit:

for showing images when done loading (put outside onload):

$('img').each(function() {     $(this).css('display','none');     $(this).on('load',function(){$(this).css('display','');}); }); 

also, want display type of loading symbol improve user experience.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -