Changing cursor to waiting in javascript/jquery

后端 未结 13 2037
孤街浪徒
孤街浪徒 2020-12-04 10:43

\"enter

How would i get my cursor to change to this loading icon when a function is ca

相关标签:
13条回答
  • 2020-12-04 11:24

    Here is something else interesting you can do. Define a function to call just before each ajax call. Also assign a function to call after each ajax call is complete. The first function will set the wait cursor and the second will clear it. They look like the following:

    $(document).ajaxComplete(function(event, request, settings) {
        $('*').css('cursor', 'default');
      });
    
    function waitCursor() {
        $('*').css('cursor', 'progress');
      }
    
    0 讨论(0)
提交回复
热议问题