How we can ignore URLs with Pace.js progress animation to one of my ajax calls, I followed the following as mentioned in the documentation, I am trying to ignore a URL 'getTip' but it still triggers the pace animation.
ajax: {
trackMethods: ['GET', 'POST'],
trackWebSockets: false,
ignoreURLs: ['arterySignalR', 'browserLink', 'getTip']
}
Or how can I use the Pace.ignore in the following call:
$("a[name^='qtipname']").each(function() {
var $this = $(this);
var id = $this.attr('rel');
$this.qtip({
content:{
text: 'Loading...',
ajax: {
url: urlTip,
type: 'GET',
loading: false,
data: {"objectID": id}
}
},
show: 'mouseover', // Show it on mouseover
hide: {
delay: 200,
fixed: true // We'll let the user interact with it
},
style: {
classes: 'ui-tooltip-light ui-tooltip-shadow',
width: 290
}
});
});
I realize this is an older post, however I recently had this requirement and this post was one of the first to come up...thought I would put my resolution here in case anyone else needs it.
Set pace options for the ignoreURLs before you load the pace.min.js library
<script>
paceOptions = {
ajax: {ignoreURLs: ['some-substring', /some-regexp/]}
}
</script>
<script src="../dist/js/pace.min.js"></script>
Example of one of my ignoreURLs:
<script>
paceOptions = {
ajax: {ignoreURLs: ['staffNameAutoComplete']}
}
</script>
<script src="../dist/js/pace.min.js"></script>
Where 'staffNameAutoComplete' is part of the ajax URL I am calling.
http://www.website.com/json.php?request=staffNameAutoComplete