How to call .ajaxStart() on specific ajax calls

前端 未结 10 842
孤独总比滥情好
孤独总比滥情好 2020-11-28 03:47

I have some ajax calls on the document of a site that display or hide a progress bar depending on the ajax status

  $(document).ajaxStart(function(){ 
              


        
10条回答
  •  没有蜡笔的小新
    2020-11-28 04:08

    Trigger
    $(document).ajaxStart(function() { $( "log" )text( "Trigger Fire successfully." ); }); $( ".local" ).click(function() { $( ".result" ).load("c:/refresh.html."); });

    Just Go through this example you get some idea.When the user clicks the element with class Local and the Ajax request is sent, the log message is displayed.

提交回复
热议问题