How to show processing animation / spinner during ajax request?

前端 未结 7 1699
礼貌的吻别
礼貌的吻别 2020-12-23 23:55

I want a basic spinner or processing animation while my AJAX POST is processing. I\'m using JQuery and Python. I looked at the documentation but can\'t figure out exactly

7条回答
  •  滥情空心
    2020-12-24 00:38

    you can set global ajax loading icon handler using here #ajxLoader takes your loading icon

       $( document ).ajaxStart(function() {
            $("#ajxLoader").fadeIn();
        });
    
        $( document ).ajaxComplete(function() {
            $("#ajxLoader").fadeOut();
        });
    

提交回复
热议问题