How to get the full height of the window when there is a scroll bar?

advertisements

var window_height = $( window ).height(); this is giving current window height not the full height including scroll height. I want full window height including scroll height.


You should check this link: How to get height of entire document with JavaScript?

    var body = document.body,
    html = document.documentElement;

var height = Math.max( body.scrollHeight, body.offsetHeight,
                       html.clientHeight, html.scrollHeight, html.offsetHeight );