That's the way it works.

Body or document refers to your page content. The window boundaries
don't matter to it, it is always the same size (unless you change it).

The body might change size after a page reload if you changed window
size though.

- ricardo


On Oct 2, 6:16 pm, Robert Koberg <[EMAIL PROTECTED]> wrote:
> FWIW, the only thing that updates when you resize a window is window:
>
>    console.log("body height: ", $("body").height());
>    console.log("document height: ", $(document).height());
>
> // only one that works
>    console.log("window height: ", $(window).height());
>
> Why is that?
>
> -Rob
>
> On Oct 2, 2008, at 4:28 PM, Robert Koberg wrote:
>
>
>
> > Hi,
>
> > I have the following:
>
> >  var winH = $("body").height();
> >  console.log("winH: ", winH);
> >  console.log("css height: ", $("body").css("height"));
>
> > If I resize the browser, the values for both remain the same as the  
> > time the page was hit by the browser. No matter what resizing I do,  
> > the height values do not change.
>
> > Have you seen this before? I know I saw this working earlier today.
>
> > thanks,
> > -Rob

Reply via email to