I am using this code to achieve a div with browser (window) height
$(document).ready(function(){
$('#div') .css({'height': (($(window).height()))+'px'});
});
But what if I want the div constraint its height to user maximum window height(max to their device limit)? As the above code only determine the current window height, once user resizing window or not opening it with max window size, it got change and failed.