<script>

$(function() {
    // Add anchors to headers
    $('article h2, article h3, article h4, article h5').each(function () {
        var url = document.URL.replace(/#.*$/, "") + '#' + $(this).attr('id');
        $(this).append(' <a class="anchor" href="' + url + '">#</a>');
    });
});

</script>