I am writing a site using jquery that repeatedly calls $(window).width() and $(window).height() to position and size elements based on the viewport
$(window).width()
$(window).height()
Note that if the problem is being caused by appearing scrollbars, putting
body { overflow: hidden; }
in your CSS might be an easy fix (if you don't need the page to scroll).