(function() {
  var navSelector = '.snapshot-diff-image .nav'

  $(document).on('click', navSelector + ' a', function(e) {
    e.preventDefault();
    $tab = $(e.target);
    $tab.closest('li').addClass('active')
      .siblings().removeClass('active');
    $('.snapshot-diff-sprite img').css('margin-left',
      $tab.data('diff-offset'));
  });

  function makeNavAffix() {
    $nav = $(navSelector);
    if (!$nav.length) {
      return;
    }
    console.log($nav.offset().top);
    $nav.affix({
      offset: { top: $nav.offset().top }
    });
  }
  $(document).on('page:load', makeNavAffix);
  $(makeNavAffix);
})();

(function() {
  var navSelector = '.snapshot-diff-image .nav'

  $(document).on('click', navSelector + ' a', function(e) {
    e.preventDefault();
    $tab = $(e.target);
    $tab.closest('li').addClass('active')
      .siblings().removeClass('active');
    $('.snapshot-diff-sprite img').css('margin-left',
      $tab.data('diff-offset'));
  });

  function makeNavAffix() {
    $nav = $(navSelector);
    if (!$nav.length) {
      return;
    }
    $nav.affix({
      offset: { top: $nav.offset().top }
    });
  }

  $(document).on('page:load', makeNavAffix);
  $(makeNavAffix);
})();

Remove console.log from snapshot tab navigation JS
Remove console.log from snapshot tab navigation JS

Change-Id: I77a3a70b647234701c723b4902e434a0e87287bb
