Answers for "how to show loading spinner on get request 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 "how to show loading spinner on get request jquery"

Browse Popular Code Answers by Language