jQuery // var theHeight = window height minus 50px?
23,705
If you are using jQuery as your tag indicates, you can just use:
var theHeight = $(window).height() - 50;
Author by
Ariel
Updated on September 12, 2020Comments
-
Ariel over 3 years
I am getting the window height like this:
var theHeight = "innerHeight" in window ? window.innerHeight : document.documentElement.offsetHeight;
I need a var that is theHeight minus 50px
How do I get that?
Thanks!