Solved, thanks.
For knowledge, I had an effect on the main content (a div containing the whole page) to fadeIn() in 1500ms. Apparently, the progressbar .js is unable to calculate the top position of the text while the content is in the "display: none" state..
I first solved by adding a timeout of 1ms to the progressbar function and it worked, but at last I changed the effect to fade in from visibility: hidden.
Thank you for your help!