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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T04:29:49+00:00 2026-06-14T04:29:49+00:00

I have some code which does the following: External content is loaded via AJAX

  • 0

I have some code which does the following:

  1. External content is loaded via AJAX (video thumbnail images)
  2. The new content is then inserted into a div using $(“#content”).append();
  3. A mobile touch scrolling helper (iScroll) is applied to this div.

However the jQuery “load” event is not firing when the DOM changes due to an AJAX event, which means the call to initialise the scroller is happening too soon (before the images inthe content has loaded) which means it often doesn’t get intiiallised. Without waiting for the images to load the content box is often short enough such that a scroll function isn’t needed, but then when the images subsequently load, the box is not scrollable.

$("#videoList").append(videoThumbnails);

$(document).load(function () {
  // doesn't fire
  initScroller(); 
});

It appears that jQuery’s append function does not block until all images referenced in the appended HTML have loaded.

How can I detect that all of the images loaded by the AJAX function have finished loading in order to call the initScroller() function AFTER all images have loaded?

  • 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-14T04:29:50+00:00Added an answer on June 14, 2026 at 4:29 am

    OK I’ve found the solution in another similar question. It turns out there’s a jQuery waitForImages plugin which does exactly what I want:

    So I can just do this:

    $("#videoList").waitForImages(function () {
        // Fires when all images in the #videoList div have loaded
        initScroller();
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code which does nothing but reading some values from a
I have some code which does the following: const string KEY_CHK = Microsoft.IW.PartCheck; SPWeb
I have the following code, which does not work correctly for some reason that
I have some C# automation code which does interesting things with Microsoft.Office.Interop.Word.Document objects. The
I have the following code which does (the first part of) what I want
I recently ran across some 3rd party C# code which does the following: public
We have some code on production which is effectively doing what this code does:
I have some code which takes strings representing hexadecimal numbers - hex colors, actually
I have some code which I want to document with in-body comments like so:
I have some code which I'm currently using to change the static-IP of a

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.