$()

in fauxton-visual-guide/js/main.js [88:135]


    $('div.chapter').each(function () {
      if (
        $(this).offset().top < window.pageYOffset + 10
        //begins before top
        && $(this).offset().top + $(this).height() > window.pageYOffset + 10
        //but ends in visible area
        //+ 20 allows you to change hash before it hits the top border
      ){

        history.replaceState(null, null, "#" + $(this).attr('id'));
        highlightFauxtonNavigation();

        if ($('#_all_dbs').visible(true)) {
          clear();
          $('#_all_dbs-sub').css({
            'color': 'black',
            'font-weight': 'bold'
          });
        }
        

        if ($('#_all_docs').visible(true)) {
          clear();
          $('#_all_docs-sub').css({
            'color': 'black',
            'font-weight': 'bold'
          });
          return;
        }

        if ($('#editor').visible(true)) {
          clear();
          $('#editor-sub').css({
            'color': 'black',
            'font-weight': 'bold'
          });
          return;
        }

        if ($('#db-action').visible(true)) {
          clear();
          $('#db-actions-sub').css({
            'color': 'black',
            'font-weight': 'bold'
          });
        }
      }
    });