I'm using jquery pace plugin with progress bar theme, all is working good. but i want to fix this run only on ajax request. After lots of searching i'm deciding to post there. Hope someone having the solution. Currently its running on both Ajax and page load.
Here's the js file call with options given by plugin. but no luck.
<script data-pace-options='{ "document": false }' src="js/pace/pace.min.js"></script>
I found the answer to stop pace.js on page load and here I'm posting this for other users.
Here's the code of js calling.
<script data-pace-options='{ "elements": { "selectors": [".selector"] }, "startOnPageLoad": false }' src="js/pace/pace.min.js"></script>
In this i'm setting pace to given selector and another option startOnPageLoad set to false to avoid loading pace on every page load.
And here is the another question on pace.js which provide me a help.
Using pace.js on loading appended images
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With