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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T20:42:10+00:00 2026-06-17T20:42:10+00:00

This is a very bizzare thing I am trying to solve. Currently I am

  • 0

This is a very bizzare thing I am trying to solve.

Currently I am loading all of this at the end of my page and when I first load the page it alerts 571 and on a refresh it alerts 627. Whereas if I move this all to the <head> tag it alerts 627 every time and that is the correct value.

Can anyone see why loading this at the end of a page would lead to a wrong smaller window height?

        <script src="js/jquery.min.js"></script>


<script> 
$(document).ready(function() {

var Height = $(window).height()-40;
$("#section1").css('min-height',Height);
$("#section2").css('min-height',Height);
alert(Height);

});
</script>
  • 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-17T20:42:12+00:00Added an answer on June 17, 2026 at 8:42 pm

    Seriously I have no clue why this happens. To find out I would definitely need the code of the whole page or a working live example.

    But in your case I would just use $(window).load instead of ready.

    <script> 
    $(window).load(function() {
    
    var Height = $(window).height()-40;
    $("#section1").css('min-height',Height);
    $("#section2").css('min-height',Height);
    alert(Height);
    
    });
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I found this very weird bug that I can't understand. First of all inside
This very likely a setup issue on my part. I am trying to run
I wrote this very simple macro to delete all rows when Column P has
I have this very simple page wich is driving me crazy. basically I have
I have this very basic tabbed block: $('.tabbed-section .panel').hide(); $('.tabbed-section .panel:first').show(); $('.tabbed-section .tabs li:first').addClass('active');
Given this very simple Makefile : all: @mkdir -pv test/{a,b} I get this output
I'm having this very odd issue while trying to serialize a class for logging
I have this very weird results when trying to fetch the AVG() field from
I currently have this very long if statement: if (somesTring != null && !.equals(somestring)
I have this very unpeculiar exception.The thing is have i have this app that

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.