Welcome Loading ... Page with jQuery

How can I implement the welcome screen in 5 seconds by providing information such as loading the application ... + some information about the application ... while the main page loads in the background.

+5
source share
5 answers

I think it’s permissible to have a “download ...” page in some cases - for example, after a user logs into a business application (think TurboTax is online ... it says something like “establish a secure connection”, that, probably not quite so, but loading the contents of the interface). Displaying a page every time an anonymous user visits your site is probably not a good idea.

jQuery BlockUI. , .

+3

, , , .

http://www.jnorton.co.uk/blog/jquery-check-if-all-content-has-been-loaded

:

$(document).ready(function(){
    $(window).load(function() {$("#welcome").fadeOut('fast'); })
});
+8

, - , . , , -, - , , .

-, Flash, , Flash.

. , " ", . , .

# 2. , , . , , , , , - .

+4

You show your welcome message when the page loads (theoretically, as an absolutely positioned overlay). Then you can use jQuery to start the timer:

$(document).ready(function(){
    setTimeout(function(){
        $('div#overlay').fadeOut();
    }, 5000);
});
+1
source

Although I agree with @TheTXI, the best way to do this is to display the default “loading ...” screen with CSS and then hide it as soon as everything is loaded using jQuery (instead of waiting for a fixed amount of time).

See jQuery.load () ... ex:

  $(document).ready(function(){
    $("body img:last").load($("#welcome-screen").fadeOut());
  });
0
source

All Articles