I am currently using $(window).width(); but this shows the width of the window when the page is loaded, and if you resize it does not update.
$(window).width();
Is there a func