Answers for "show loader before ajax call jquery"

1

$.post jquery beforesend loader

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

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

jquery ajax add loading

var $loading = $('#loadingDiv').hide();
$(document)
  .ajaxStart(function () {
    $loading.show();
  })
  .ajaxStop(function () {
    $loading.hide();
  });
Posted by: Guest on December-01-2020

Browse Popular Code Answers by Language