How do I override ajax-progress-throbber in a theme? In my Drupal 7 site, I created a custom theme. In my theme, I want to change the AJAX progress throbber HTML structure, which by default is the following one.

&lt;div class="ajax-progress ajax-progress-throbber"&gt;&lt;div class="throbber"&gt;&amp;nbsp;&lt;/div&gt;&lt;div class="message"&gt;Please wait...&lt;/div&gt;&lt;/div&gt;


I searched a lot about this issue, but I couldn't find any useful document or sample.
There is a new way of doing this as per this change record
add the following into the respective files
THEMENAME.info.yml
libraries-extend:
  core/drupal.ajax:
    - THEMENAME/throbber

THEMENAME.libraries.yml
throbber:
  css:
    css/throbber.css: {}
  js:
    js/throbber.js: {}
  dependencies:
    - core/jquery
    - core/drupal

js/throbber.js
/**
 * @file
 * Replaced Drupal cores ajax throbber(s), see: https://www.drupal.org/node/2974681
 *
 */
(function ($, Drupal) {
  Drupal.theme.ajaxProgressThrobber = function () {
    return &quot;&lt;div class=\&quot;ajax-spinner ajax-spinner--inline\&quot;&gt;&lt;span class=\&quot;ajax-spinner__label\&quot;&gt;&quot; + Drupal.t('Loading&amp;nbsp;&amp;hellip;', {}, {
      context: &quot;Loading text for Drupal cores Ajax throbber (inline)&quot;
    }) + &quot;&lt;/span&gt;&lt;/div&gt;&quot;;
  };
  
  Drupal.theme.ajaxProgressIndicatorFullscreen = function () {
    return &quot;&lt;div class=\&quot;ajax-spinner ajax-spinner--fullscreen\&quot;&gt;&lt;span class=\&quot;ajax-spinner__label\&quot;&gt;&quot; + Drupal.t('Loading&amp;nbsp;&amp;hellip;', {}, {
      context: &quot;Loading text for Drupal cores Ajax throbber (fullscreen)&quot;
    }) + &quot;&lt;/span&gt;&lt;/div&gt;&quot;;
  };
    // You can also customize only throbber message:
    // Drupal.theme.ajaxProgressMessage = message =&gt; '&lt;div class=&quot;my-message&quot;&gt;' + message + '&lt;/div&gt;';
})(jQuery, Drupal);

css/throbber.css
// optional code of your ajax-spinner classes

An alternative would be to use the ajax_loader module which lets you customize the throbber.