You can put this in a .css
file -
body { display:none; }
Or even put it on a line like this:
<body style="display:none;" >
And then in the callback $(document).ready()
disappears when using this -
$(document).ready(function(){ $("body").fadeIn(400); });
First, the browser will display the HTML according to your css
file. Therefore, when the browser comes to the rendering of the <body>
, it will see a css rule that says that its display
property should be set to none
. Only after loading HMTL and jQuery is ready ( $(document).ready()
), can you call fadeIn()
;
source share