title: Calculate Div Position on Browserwindow resize
body: <p>when I run my web page, an animation is running and positioned the navigation to a specific position. if I make the browser smaller, the position is no longer correct. only when I reloaded. you can make live this somehow?</p>
  
  <pre><code>var viewportWidth = $(window).width();
  var viewportHeight = $(window).height();
  var contentHeight = $('#content').height();
  var footerHeight = $('#footer').height();
  var newSize = viewportHeight - footerHeight + 30;
  var $navigation = $('#navigation');
  var $logo = $('#logo');
  var $win = $(window).scroll(function () {
  
      $navigation.animate({
          top: newSize
      }, 1500, function () {
          // $('#navigation .active').removeClass('active');
          // $('#navigation .current').addClass('active');
          $('#arrow').css('display', 'block');
          console.log('animation 1 finished');
      });
      )};
  </code></pre>