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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T14:05:06+00:00 2026-06-16T14:05:06+00:00

I am trying to make 4 sliding galleries but I need to preload (cache)

  • 0

I am trying to make 4 sliding galleries but I need to preload (cache) all images behind a splash screen before displaying the images in gallery form. I have been trying to use “jPreLoader v2 – http://www.inwebson.com/jquery/jpreloader-a-preloading-screen-to-preload-images” but with no luck.

The code below is how I have been trying to preload all images from each gallery directory on to a single gallery behind jpreloader then once load complete remove the whole gallery and display each gallery at a time.

var pictures =  [
    "1.jpg",
    "2.jpg",
    "3.jpg",
    "4.jpg",
    .......,
    "30.jpg"
 ]

$(window).load(function(){

preLoad();

function preLoad(){
    var max = 30;
    var pic;
    picture = '<table id="table" style="dipslay:table;"><tr>';
    for (var i=0;i < max; i++){
        if(i < 30){
            pic = "images/art/"+pictures[i];
            appendCell(pic);
        }
        if(i < 17){
            pic = "images/street/"+pictures[i];
            appendCell(pic);
        }
        if(i < 19){
            pic = "images/doc/"+pictures[i];
            appendCell(pic);
        }
        if(i < 16){
            pic = "images/commercial/"+pictures[i];
            appendCell(pic);
        }
    };
    picture += '</tr></table>';
    $('#imageScroller').append(picture);
}

function appendCell(pic){
    picture +="<td class='image'><img class='i' src='"+pic+"'></td>";
    return;
}
});

Im not quite sure how to implement the jpreloader on a dynamic image loading loop above instead of already inserted into the dom.

$(document).ready(function () {
$('body').jpreLoader();
});

Thanks.

  • 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-16T14:05:07+00:00Added an answer on June 16, 2026 at 2:05 pm

    Custom progress bar that updates as images are downloaded

    var pictures = [
                        "1.jgp",
                        "2.jpg"
                    ];
    
    var loadedSoFar = 0;
    
    function loaded( ) {
        // do stuff
    }
    
    function updateProgress( ) {
    
        loadedSoFar++;
    
        var newWidth = $("#progress").width() * ( loadedSoFar / pictures.length );
        $("#bar").stop( true, true );
        $("#bar").animate({ width: newWidth }, 500, function( ) {
            if( loadedSoFar === pictures.length ) { loaded() }
        });
    }
    
    for( var i = 0; i < pictures.length; i++ ) {
        var img = new Image();
        img.src = pictures[ i ] + i;
    
        img.onload = function( ) {
            updateProgress();
        }
    }
    

    Demo here

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

Sidebar

Related Questions

I am trying to make an imageview that rotates while sliding across the screen.
I am trying make long screen to vertical direction. So, I need a screen
I'm trying to eventually make a sliding form with jQuery, but while testing out
I'm trying to make some sliding captions, something like Mosaic , but lighter. Everything
I'm trying to make a sliding panel using .animate function because I want it
Trying to make a small countdown timer in my app but it's not working.
I'm trying to make a sliding menu just like Youtube or Google+ app. I'm
I am trying really hard to make a sliding frame containing widgets in tkinter
im trying make one replace in string from a array but this dont work
I'm trying make one treeView with infinite subgroups. I can add my groups 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.