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 8060735
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T10:05:24+00:00 2026-06-05T10:05:24+00:00

I found this nice jQuery preloader/progress bar , but I cannot get it to

  • 0

I found this nice jQuery preloader/progress bar, but I cannot get it to work as it is supposed to. The problem is that it first loads my page and after my whole page is loaded the 0%-100% bar displays quickly, after that it reloads my page again. So it does not show the progress bar BEFORE the page loads and it loads the page a second time as well.

Here is my implementation code:

<head>
    <script src="js/jquery-1.7.2.min.js" type="text/javascript"></script>
    <script src="js/jquery.queryloader2.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $("body").queryLoader2();
        });
    </script>
</head>
<body>
    My content...No other reference in here for the Jquery preloader
</body>

Thanks for any help in advance.

  • 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-06-05T10:05:26+00:00Added an answer on June 5, 2026 at 10:05 am

    I could be very, very wrong here, but in my opinion:

    1. The plugin is flawed.
    2. You have some issue in your page that causes a redirect.

    I have created a test fiddle and found out the following:

    1. If there are no images on the page, then the plugin’s private function completeImageLoading(); is never called because it is only bound to the image elements. When there are no images -> there’s no binding -> no triggering -> nothing completes -> you stay with overlay 0% as demonstrated by the fiddle that is NOT RUN (jsfiddle doesn’t see relative images when the page is not run).
    2. The plugin doesn’t take into consideration remote images. So if you declare them like so <img src="http://example.com/image.jpg"> – then it won’t work because the plugin doesn’t recognize them. In fact it is using $.ajax to load images which, obviously, generates a error when trying to access another domain.
    3. The plugin doesn’t reload the page (at least in Google Chrome)… check your console output while in the fiddle. It displays the message once per click on Run.

    Suggestions:

    1. Make sure you provide at least one relative or background image (though I haven’t tested backgrounds…) for the plugin to work.
    2. Show us more code. The fiddle demonstrates that the plugin does NOT cause page reload (at least in Chrome… are you using another browser?). It must be something you made that interferes here.
    3. Specify some options for the plugin (behaves weird when there are none).

    Edit regarding preloader

    Regarding preloader… if displaying progress is not mandatory for you, then you can just use a window.onload trick. On DOM ready $(...) you create an opaque page overlay with a “Please wait…” message and some animation if you fancy it. Then you wait for window.onload event which “fires at the end of the document loading process… when all of the objects in the document are in the DOM, and all the images and sub-frames have finished loading.” When window.onload triggers, you just remove your overlay and voila – the page is ready!

    Edit 2 regarding preloader

    Actually, you don’t even need $(...)… what the hell was I thinking? Just create your overlay (a simple div with a unique id) in your html, style it so that it fills the screen and give it a z-index:1337 CSS attribute so that it covers the entire page. Then, on window.onload:

    window.onload = function () {
        // Grab a reference to your overlay element:
        var overlay = document.getElementById('myOverlay');
        // Check if the overlay really exists
        // and if it is really appended to the DOM,
        // because if not - removeChild throws an error
        if (overlay && overlay.parentNode && overlay.parentNode.nodeType === 1) {
            // Remove overlay from DOM:
            overlay.parentNode.removeChild(overlay);
            // Now trash it to free some resources:
            overlay = null;
        }
    };
    

    Of course, it’s not really a preloader, but simply an imitation.

    Here’s a working fiddle you can play with.

    P.S. I personally don’t appreciate preloaders, but that’s just me…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I found a nice example on how to use AJAX in jQuery at this
I searched for some nice easy to use jQuery tooltip plugin but couldn't found
I am using a nice jquery slideshow plugin I found and trying to get
i found this nice jquery plugin http://www.goat1000.com/tagcanvas.php the description says: The canvas is a
I've found this nice jquery plugin tag it! http://levycarneiro.com/2010/03/tag-it-tag-suggestions-editor-and-autocomplete-in-a-jquery-ui-plugin/ and want to implement it
I've found this nice library to make localization in a .NET application. Problem is,
I've found this nice slick effect in here - http://www.red-team-design.com/wp-content/uploads/2011/04/css3-box-shadow.html . Here is a
Found this post that helped me out: Split a string to form multidimensional array
Found this post Include namespace in Rails 3.1 console but it doesn't seem to
Found this: Sub SurroundWithAppendTag() DTE.ActiveDocument.Selection.Text = .Append( + DTE.ActiveDocument.Selection.Text + ) End Sub But

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.