Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Internet Explorer innerHeight

How can you get the window.innerHeight in internet explorer. Thanks.

like image 995
Shane Larson Avatar asked May 03 '11 02:05

Shane Larson


People also ask

What is Windows innerHeight?

The read-only innerHeight property of the Window interface returns the interior height of the window in pixels, including the height of the horizontal scroll bar, if present. The value of innerHeight is taken from the height of the window's layout viewport.

How do I get the innerHeight window in CSS?

Use window. innerWidth and window. innerHeight to get the current screen size of a page.

How do you get to innerWidth?

We can get the inner width of any element using the jQuery innerWidth() method. The innerWidth() method returns the inner width of the first matched element including padding but not border.

How do I change the window in innerWidth?

An integer value indicating the width of the window's layout viewport in pixels. This property is read-only, and has no default value. To change the window's width, use one of the Window methods for resizing windows, such as resizeBy() or resizeTo() .


1 Answers

window.getWinSize= function(){
    if(window.innerWidth!= undefined){
        return [window.innerWidth, window.innerHeight];
    }
    else{
        var B= document.body, 
        D= document.documentElement;
        return [Math.max(D.clientWidth, B.clientWidth),
        Math.max(D.clientHeight, B.clientHeight)];
    }
}
like image 75
kennebec Avatar answered Nov 15 '22 14:11

kennebec