Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7025617
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:59:53+00:00 2026-05-27T23:59:53+00:00

Now the problems might be different for everyone, however in Firefox – the loading

  • 0

Now the problems might be different for everyone, however in Firefox – the loading finishes and the load div doesn’t disappear unless you refresh the browser. In chrome, the load never disappears. I don’t have IE so I’m not sure what scary things happen there.

A breakdown of my code:

  • A,B Preload and set 2 backgrounds
  • C Load in a container window which will house all content
  • Load some content(D), and load more content(E) inside inside
    content(D)
  • F Preload Div on top fades out
  • G Div with preloaded background(A) fades in
  • H Fade in a DIV which contains container(C) and all content(D,
    E)
  • I Do some minor initial setup to tables in functions.js

Here is what it looks like

And here’s the code:
I put the comment letters on the right-hand side

    var  src1 = 'img/map_bg_1680.jpg'                                                              //A
    , $img1 = $( '<img src="' + src1 + '">' );                                                   //A

    var  src2 = 'img/menu-background.png'                                                          //B
    , $img2 = $( '<img src="' + src2 + '">' );                                                   //B


$img1.bind( 'load', function(){                                                                 //A
    $( '#bgDiv' ).css( 'background-image', 'url( ' + src1 + ')' );                                  //A

        $img2.bind( 'load', function(){                                                         //B

            jQuery('#main-content-fiftyfive').load('index2.html', function() {                     //C
                jQuery( '#viewport-container' ).css( 'background-image', 'url( ' + src2 + ')' );   //A

                $('#right-content').load('partytool.html', function() {                         //D
                    $('#whole-ajax-content-one').load('events.html', function() {                   //E
                        $( '.preloader' ).fadeOut('slow', function() {                              //F
                            $( '#bgDiv' ).fadeIn('slow', function() {                               //G
                                $( '#table-holder' ).fadeIn('slow', function() {                    //H
                                initialConfig();                                                   //I
                        });
                    });
                });
            });     
        });
    });
} );
} );
if( $img1[0].width ){ $img1.trigger( 'load' ); }                                                     //A
if( $img2[0].width ){ $img2.trigger( 'load' ); }                                                     //B

Thanks for your help everyone :))

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T23:59:53+00:00Added an answer on May 27, 2026 at 11:59 pm

    You’re only adding the load for $img2 after $img1 has loaded. Add them at the same time and have your final callback check to see that both are loaded, e.g.:

    var img1loaded = false
      , img2loaded = false;
    
    $img1.bind( 'load', function(){
        img1loaded = true;
        finish();
    } );
    
    $img2.bind( 'load', function(){
        img2loaded = true;
        finish();
    } );
    
    function finish(){
        if( !img1loaded || !img2loaded ){ return; }
        // both are loaded
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Currently having some problems- now = datetime.datetime.now() month = now.strftime(%B) site = wikipedia.getSite('en', 'wikiquote')
I'm onto problem 245 now but have hit some problems. I've done some work
For about a year now, I've had problems trying to send and receive email
Here's my problem I am using a depth control but now i have different
I'm having some problems tracing the reason that I can't load a java(fx) applet.
i m using jQuery tablsorter plugin, it's working perfect,but now problem is ... i
I would like solve the problem (now hypothetical but propably real in future) of
I am trying to make a chatroom layout like the following: Now my problem
I'm having (many, but for now,) one problem with a project I'm working on.
I set up the basic Authentication/Authorization set up, but a problem now is that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.