title: jQuery scrolls to wrong offset after dynamically loading content
body: <p>For some reason this code, which usually scrolls up/down to the start of the specified targetDiv, instead scrolls the page further down the page than the end of where the targetDiv already is.</p>
  
  <pre><code>function postData(data, url, divAction, targetDiv) {
      $.ajax({
          type: 'POST',
          url: url,
          data: data,
          success: function(response) {
              if (divAction == 'hide') {
                  $(targetDiv).hide();
                  $(targetDiv).empty();
              }
              if (divAction == 'refresh') {
                  $(targetDiv).html(response);
                  $('html, body').animate({
                      scrollTop: '+=' + $(targetDiv).offset().top + 'px'
                  }, 'fast');
              }
          },
          error: function() {
              alert('Error! Plese try again.');
          }
      });
      return false;
  };
  </code></pre>
  
  <p>Any suggestions appreciated!</p>