javascript - jQuery: display web page only after document.ready -


When I load a web page inside the document. I use an Ajax function:

  $ (document) .ready (function () {callAjaxFunction ();}); The effect is that the web page is displayed with the first empty field, and the field pops up after the Ajax function is over. How to show the web page after the Ajax function returns? (Show area once populated)?   

You can try to hide your entire document body first and then show it with AJAX callback Something like this:

CSS:

  body {display: none; }  

js:

  $ (document) .ready (function () {callAjaxFunction ();}); Function ajaxcallbackfunction () {// callback function code, field $ ('body'). Show (); }  

So you have Ajax data once, pages will be displayed with populated areas.


Comments

Popular posts from this blog

php - Select box validation (in laravel) -

pandas - Iterate on Groupby Object's fields -

Creating a sparse matrix in Matlab with a specified number of independent Bernoulli +-1 nonzero entries -