Window height detect es6

const result  = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;

Or

const result = window.screen.availHeight;

Or

const result = window.innerHeight;

in jquery : 

$(window).height(); // Full height of the HTML page, including content 

 $(document).height(); // document's viewport height

Comments

Popular posts from this blog

world tourism guide Template

Es6 how to check if value is not null or undefined?