I'm using this plugin, Page.JS - link - to make a progress bar on the site.
I'm calling it like this:
<script src='js/vendor/pace.min.js' data-pace-options='{ "elements": false, "startOnPageLoad": true, "restartOnRequestAfter": false }'></script>
It is partially working. When I enter the page loads the progress bar.
The problem is that this is happening on every request. As it is a Single Page my site, I have a script that when scrolling the screen goes changing the URL. For example, I have a MENU like this:
Home
Contact
Products
And when you scroll for a particular session, you're doing localhost/pagina#home
, localhost/pagina#contato
and so it goes.
And when I scroll the page, the progress bar appears.
I'm not understanding how this plugin works.