javascript - Pace.JS Qtip how to ignore the Pace Animation - Stack Overflow

How we can ignore URLs with Pace.js progress animation to one of my ajax calls, I followed the followi

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 
        }
    });
});

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 
        }
    });
});
Share Improve this question edited Apr 7, 2020 at 10:57 j3ff 6,1398 gold badges43 silver badges54 bronze badges asked Dec 4, 2014 at 4:45 AzharAzhar 2815 silver badges17 bronze badges 1
  • try absolute path in Pace.ignore ignoreURLs – Girish Commented Dec 4, 2014 at 5:16
Add a ment  | 

1 Answer 1

Reset to default 7

I realize this is an older post, however I recently had this requirement and this post was one of the first to e 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./json.php?request=staffNameAutoComplete

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745335154a4623066.html

相关推荐

  • javascript - Pace.JS Qtip how to ignore the Pace Animation - Stack Overflow

    How we can ignore URLs with Pace.js progress animation to one of my ajax calls, I followed the followi

    7小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信