JAVASCRIPT   27

scripts

Guest on 28th July 2022 06:31:54 PM

  1. var Indicator = {
  2.     set: function(containerSelector, append) {
  3.         var indicator = '<div class="indicator"><i class="fa fa-cog fa-spin fa-5x"></i></div>';
  4.  
  5.         if (append) {
  6.             jQuery(containerSelector).append(indicator);
  7.         } else {
  8.             jQuery(containerSelector).html(indicator);
  9.         }
  10.     },
  11.  
  12.     remove: function(containerSelector) {
  13.         jQuery(containerSelector).find('.indicator').remove();
  14.     }
  15. };

Raw Paste


Login or Register to edit or fork this paste. It's free.