title: jQuery on window resize
body: <p>I have the following JQuery code:</p>
  
  <pre><code>$(document).ready(function () {
      var $containerHeight = $(window).height();
      if ($containerHeight &lt;= 818) {
          $('.footer').css({
              position: 'static',
              bottom: 'auto',
              left: 'auto'
          });
      }
      if ($containerHeight &gt; 819) {
          $('.footer').css({
              position: 'absolute',
              bottom: '3px',
              left: '0px'
          });
      }
  });
  </code></pre>
  
  <p>The only problem is that this only works when the browser first loads, I want <code>containerHeight</code> to also be checked when they are resizing the window?</p>
  
  <p>Any ideas?</p>