code: function syncScroll(e) {
              // vars
              var $codeViewport = $(e.target),
                  $previewViewport = $('.entry-preview-content'),
                  $codeContent = $('.CodeMirror-sizer'),
                  $previewContent = $('.rendered-markdown'),
  
              // calc position
                  codeHeight = $codeContent.height() - $codeViewport.height(),
                  previewHeight = $previewContent.height() - $previewViewport.height(),
                  ratio = previewHeight / codeHeight,
                  previewPostition = $codeViewport.scrollTop() * ratio;
  
              // apply new scroll
              $previewViewport.scrollTop(previewPostition);
          }
docs: Sync scrolling