如何忽略带有Pace.js进度动画的URL到我的ajax调用之一,如文档中提到的,我试图忽略URL 'getTip‘,但它仍然触发了pace动画。
ajax: {
trackMethods: ['GET', 'POST'],
trackWebSockets: false,
ignoreURLs: ['arterySignalR', 'browserLink', 'getTip']
}或者如何在以下调用中使用Pace.ignore:
$("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
}
});
});发布于 2015-03-22 04:29:11
我意识到这是一个旧的帖子,但我最近有这个要求,这个帖子是第一个来的up...thought,我会把我的决议放在这里,以防其他人需要它。
在加载pace.min.js库之前设置不光彩the的pace选项
<script>
paceOptions = {
ajax: {ignoreURLs: ['some-substring', /some-regexp/]}
}
</script>
<script src="../dist/js/pace.min.js"></script>我的一个不光彩的one的例子:
<script>
paceOptions = {
ajax: {ignoreURLs: ['staffNameAutoComplete']}
}
</script>
<script src="../dist/js/pace.min.js"></script>其中'staffNameAutoComplete‘是我调用的ajax的一部分。
http://www.website.com/json.php?request=staffNameAutoComplete
https://stackoverflow.com/questions/27286473
复制相似问题