AJAX page transitions with history.pushState
So I just went through my article step-by-step and I indeed missed adding the new content into $main. I think there may have been a versioning mistake in the article's code as I definitely tested it.

Anyways, here's an updated loadPage function for you. Which I will be adding to the article tomorrow. I've added a few extra things to ensure that there's no content (like the footer if you include it in layout.twig) jumping when the content switches out, so feel free to modify that.

loadPage = function(href) {

  $main.wrapInner('&lt;div class="new-results-div" /&gt;');

  /* ----- Get height of new container inside results container and to ensure the footer doesn't jump up -----  */
  var newResultsHeight = $('.new-results-div').outerHeight();
  $main.height(newResultsHeight);

  $('.js-ajax-wrapper').velocity('transition.fadeOut', {
    /* ----- Upon completion of animating out content put user at top of page. ----- */
    complete: function(){
      $('html').velocity("scroll", {
        duration: 0,
        easing: "ease",
        mobileHA: false
      });
    }
  });

  $.ajax({
    type: 'POST',
    url: href,
    data: {},
    success: function(result){
      /* ----- HERE'S WERE THE CONTENT GET'S ADDED ----- */
      $main.html(result);

      /* ----- Wrap content in div so we can get it's height ----- */
      $main.wrapInner('&lt;div class="new-results-div" /&gt;');

      /* ----- Get height of new container inside results container and set $main to it so there's no content jumpage -----  */
      var newResultsHeight = $('.new-results-div').outerHeight();
      $main.height(newResultsHeight);

      /* ----- Bring In New Content ----- */
      $('.js-main .js-ajax-wrapper').velocity('transition.fadeIn', {
        visibility: 'visible',
        complete: function() {
          /* ----- Removes the temp height from $main ----- */
          $main.css('height', '');
          ajaxLoad();
        }
      });
    },
    error: function(){
      console.log("error.");
      location.reload();
    }
  });

};


Apologize for any trouble due to the missing code. Feel free to let me know if you have any other questions.