How to show processing animation / spinner during ajax request?

前端 未结 7 1701
礼貌的吻别
礼貌的吻别 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:42

    The best method I have found, assuming you are populating a present but empty field is to have a .loading class defined with background-image: url('images/loading.gif') in your CSS. You can then add and remove the loading class as necessary with jQuery.

提交回复
热议问题