Answers for "before send ajax jquery load a spinner and the send request"

1

before send ajax loading

$("#loading").ajaxStart(function(){
   $(this).show();
 });

$("#loading").ajaxComplete(function(){
   $(this).hide();
 });
Posted by: Guest on November-23-2020
0

before send ajax loading

$.ajax({
   url : dle_root + 'engine/ajax/fast.php',
   data: { text: response, action: action },
   beforeSend: function(){
     $("#loading").show();
   },
   complete: function(){
     $("#loading").hide();
   },
   success:  function (data) {
        if (data == 'ok') {
            DLEalert(dle_p_send_ok, dle_info);
        }
        else { DLEalert(data, dle_info); }
    });
 });
Posted by: Guest on April-25-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language