Simple window resize script

Simple window resize script

Hi guys. I was hoping someone could guide me on a simple jquery script that resizes the browser window when a site loads to fit the users display size.

Any guidance would be appreciated. So far I have found this code, which looks close, but I'm not sure which bits I need to change:

$(function(){
$(window).resize(function(){
       var h = $(window).height();
       var w = $(window).width();   
       });
});