Include pace.js and the theme css of your choice on your page (as early as is possible), and you're done!
Pace will automatically monitor your ajax requests, event loop lag, document ready state, and elements on your page to decide the progress. On ajax navigation it will begin again!
If you use AMD or Browserify, require in pace.js and call pace.start()
as early in the loading process as is possible.
=========================================================================
but now how do i actually control the load timing of the plugin , the other problem is the contents of the page are visible when the preloader is loading , why ? does the plugin provide a mechanism to hide the page contents while the plugin loads or is that on me ?
thank you.