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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T20:36:04+00:00 2026-06-14T20:36:04+00:00

I am making a website that is divided by several sections <div id=’section-1′ class=’section’>web

  • 0

I am making a website that is divided by several sections

<div id='section-1' class='section'>web content</div>
<div id='section-2' class='section'>web content</div>

I have like ten sections on my webpage ,each sections height is set to the user window height when document is ready by javascript

$('.section').height($(window).height());

Some effects like slideshows on my webpage require the calculated height of the section in order to work properly. Therefore I always use something like this at document ready as a solution.

setTimeout(startslideshow,1000);
setTimeout(startanimations,1000); ...etc  

To make sure the section height is the user window height before the slideshow’s code start because the sections cannot change to user window height instantly once the webpage loaded will generate serious problems in my slideshow code,like wrong calculated positions.

Therefore there will be a situation that’s after the page loaded, there will be about a second everything is messed up,before everything can works properly, how could I avoid that being seen by the user? I tried to $(document).hide(),or $('html,body').hide(), then fade in after a second,but I get other weird problems, especially on ipad,my fixed position top navigation bar will always become ‘not fixed’ while user is scrolling.

As I am a self-learner, I afraid my method is not typical.
I want to know what is the common ways of real web programmers usually do when they have to divide his webpage into different sections and set its height to window height , then make sure the other effects that’s depends on the section height works properly and avoid to wait the height change for a second?

  • 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-14T20:36:05+00:00Added an answer on June 14, 2026 at 8:36 pm

    You should look at chaining Asynchronous calls.

    relying on timers is not recommended as scripts may execute at different speeds on different browsers, hardware, etc.

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

Sidebar

Related Questions

I'm making website that have notification 'button'. When user click this button, notification div
I have a website that I'm making that needs a background resizer. Currently, I
I am making a small section of an app (phone and website) that can
I have a website that uses the AjaxControlToolkit. I'm making some parallel iPhone-friendly pages
I would like to pursue making a website widget that can allow visitors to
I have a busy photo website that is currently making a new page request
I am interested in making a website that flashes through a visitors entire web
I was making navigation menu for my website that works like this: there is
I have this website that I'm making for someone (immo-deal.be) and it shows certain
I have a page on my website that I am making a call to

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.