Answers for "loading spinner jquery"

3

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
-1

loading button jquery

view source
01
$('.button-class').click(function () {
02
 
03
  var btn = $(this);
04
 
05
  $(btn).buttonLoader('start');
06
 
07
  setTimeout(function () {
08
 
09
    $(btn).buttonLoader('stop');
10
 
11
  }, 5000);
12
 
13
});
Posted by: Guest on January-04-2022

Browse Popular Code Answers by Language