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

  • Home
  • SEARCH
  • 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 7651281
In Process

The Archive Base Latest Questions

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

I want to have a page loaded into a div and while the page

  • 0

I want to have a page loaded into a div and while the page is loading display a progress bar ( preferably somewhat close to the actual progress of the page load ) and then after the page is loaded slideUp the bar and display the content.

Current chain of events:

  1. User Click Links
  2. Progress Bar Slides Down
  3. Progress Bar Animates to Page Load
  4. Progress Bar Slides Up
  5. Page Content Displays

Code:

function pageLoad(url){
    $('body').css('cursor','wait');
    $('#page-load-wrap').slideDown();
    width = $('#page-load-indicator').css('width','100%');
    $('#mainframe').load(url,function(){
        $('#page-load-wrap').slideUp();
        $('body').css('cursor','default');
    }); 
}
  1. How would I modify this code to match the actual progress of the resource load?
  2. How can I slideUp the div before the content appears?

=======EDIT=======

Using the code in the answer below I just set the width to 80% before the get function call
then in the success call set it to 100%. Slid the div Up and then displayed the html

       function pageLoad(url){
                $('body').css('cursor','wait');
                $('#mainframe').html('');
                $('#page-load-wrap').slideDown();
                $('#page-load-indicator').css('width','80%');

                $.get(url,function(data){
                $('#page-load-indicator').css('width','100%');
                $('#page-load-wrap').slideUp('slow',function(){
                    $('#mainframe').html(data);
                });
                $('body').css('cursor','default');
                }); 
            }
  • 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-31T11:27:54+00:00Added an answer on May 31, 2026 at 11:27 am

    How would I modify this code to match the actual progress of the resource load?

    You cant with just javascript.

    How can I slideUp the div before the content appears?

    Use $.get instead since it allows you to slide up before setting the content:

    function pageLoad(url){
        $('body').css('cursor','wait');
        $('#page-load-wrap').slideDown();
        width = $('#page-load-indicator').css('width','100%');
    
        $.get(url,function(data){
            $('#page-load-wrap').slideUp();
            $('body').css('cursor','default');
    
            // and load the html
            $('#mainframe').html(data);
        }); 
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a web page. When this web page is loaded, I want to
I have page A and pageB. Page A loads page B into a div.
I have a page that loads videos via .load(). I want to add loading
i've got a problem, im loading into a div a page with form, that
I have loaded a table of data into an HTML page so that it
I have a file, say 'file1.html', loaded into a div via jQuery $('#info').load('info/file1.html'); I
I have a page that is dynamically loaded into another page by an jQuery
I want to have a page redirect to another. Here is the situation: I
I have a page that above it I want to have a panel that
I have a page based on a model object, and I want to have

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.