rlmv/gitbook-plugin-anchors

anchor jump not working

anibalsanchez opened this issue · 1 comments

Hi,

We have updated to the latest gitbook version. Now, we have found that anchors are not working.

For example, you visit the Url, it is defined, but browser does not jump.

To fix it, we have added jQuery and a script with addcssjs plugin. In this way, location it forced to jump to the Url with anchor.

var target = window.location.hash;

window.location.hash = "";

$(document).ready(function() {
    setTimeout(function() {
        document.location.hash = target;
    }, 50);
});
rlmv commented

Is this still the case? The plugin works fine for me and I can't reproduce your bug with the latest Gitbook version.