src/js/theme/navigation.js
function scrollToHash(hash) {
    var $scroller = getScroller(),
        dest = 0;

    // Don't try to scroll if element doesn't exist
    if (!pageHasElement(hash)) {
        return;
    }

    if (hash) {
        dest = getElementTopPosition(hash);
    }

    // Unbind scroll detection
    $scroller.unbind('scroll');
    $scroller.animate({
        scrollTop: dest
    }, 800, 'swing', function() {
        // Reset scroll binding when finished
        $scroller.scroll(handleScrolling);
    });

    // Directly set chapter as active
    setChapterActive(null, hash);
}
function scrollToHash(hash) {
    var $scroller = getScroller(),
        dest = 0;

    // Don't try to scroll if element doesn't exist
    if (!pageHasElement(hash)) {
        return;
    }

    if (hash) {
        dest = getElementTopPosition(hash);
    }

    // Unbind scroll detection
    $scroller.unbind('scroll');
    $scroller.animate({
        scrollTop: dest
    }, 800, 'swing', function() {
        // Reset scroll binding when finished
        $scroller.scroll(handleScrolling);
    });

    // Directly set chapter as active
    setChapterActive(null, hash);
}
/*
Scroll to a specific hash tag in the content