I want to change the height of a box that has id # block2, I will change it according to the user's browser window, if the window length is 1000px then the box height will be 1000px.
I'll check the size of the browser window each time it's resized
var winHeight = $(window).height(),
winWidth = $(window).width();
$(window).resize(function(){
$('#block2').css("height",winWidth + "px");
console.log($('#block2').height())
});
if something is wrong please correct it .. because the code I wrote doesn't work in the browser