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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T23:07:50+00:00 2026-06-12T23:07:50+00:00

Part of loading an html page I’m working on (with JQuery) involves instantiating several

  • 0

Part of loading an html page I’m working on (with JQuery) involves instantiating several javascript objects, each which adds an image to the page. The object constructor waits for the image to load using $(window).load() gets their dimensions, and scales based on cookie values.

Once the page is loaded (again, using $(window).load()), the main page hides most of the images using .hide(); they’ll reappear later.

The problem I’m having is that the main page hides the images before the JS objects can get their dimensions. I need the main page to wait for all of the objects to finish the image manipulation before it hides the images.

  • 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-12T23:07:51+00:00Added an answer on June 12, 2026 at 11:07 pm

    Don’t add the images to the page and hide them after they’re loaded.

    Load them, measure their sizes (see jQuery: how to get the dimensions of a external image?, jQuery callback on image load (even when the image is cached)) and add them to the DOM once they’re needed.

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

Sidebar

Related Questions

Possible Duplicate: javascript not working in the new part when loading a new part
I'm loading part of my webpage using AJAX, in particular jQuery.load() . With this
I am working on code re-factoring of configuration file loading part in PHP. Earlier
While working with jQuery and PHP a problem occurs with loading new data from
I am loading a folder of images into a html page using the following
Possible Duplicate: Show Page Loading Spinner on Ajax Call in jQuery Mobile Is it
What is the best practice for loading XML into a HTML page? For instance,
I'm using the jQuery BlockUI plugin to add a loading splash to a page
I am working on a single page JQuery Mobile site. JQuery initialization is initially
If you have JS code which is intended to run as part of loading/building

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.