Answers for "show spinner during API request pure html and jquery"

1

show spinner during API request pure html and jquery

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

show spinner during API request pure html and jquery

$('#loadingDiv')
    .hide()  // Hide it initially
    .ajaxStart(function() {
        $(this).show();
    })
    .ajaxStop(function() {
        $(this).hide();
    })
;
Posted by: Guest on December-01-2020

Code answers related to "show spinner during API request pure html and jquery"

Browse Popular Code Answers by Language