Obtain height in pixels of the browser that the user uses with jQuery

0

I need to obtain the height data of the user's browser. The height of the screen does not help me because in desktop computers it can be resized manually.

I'm trying this:

$(window).height();

But the value it returns is 258px and the header already has 130px. What I want are the dimensions of the rectangle that the user sees.

    
asked by JetLagFox 13.08.2017 в 22:29
source

1 answer

0

You can get that value with one of these two properties of the window object

     //Este omite el tamaño de la Barra de Herramientas y las de Scroll
     console.log(window.innerHeight);
     // o este que incluye ambos valores
     console.log(window.outerHeight);
    
answered by 16.08.2017 в 16:13