Skip to content

Instantly share code, notes, and snippets.

@tomaskavalek
Created January 4, 2021 11:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomaskavalek/8a09d94c2fbfaad582af8f9208e96649 to your computer and use it in GitHub Desktop.
Save tomaskavalek/8a09d94c2fbfaad582af8f9208e96649 to your computer and use it in GitHub Desktop.
WordPress Contact Form 7 + Invisible reCAPTCHA – Removing duplicate ajax-loader
(function ($) {
'use strict';
// CF7 + reCAPTCHA
if($('.ajax-loader').length > 1) {
if($('input[type=submit].wpcf7-form-control.wpcf7-submit').is(":hidden")) {
if ($('input[type=submit].wpcf7-form-control.wpcf7-submit + span.ajax-loader').length) {
$('input[type=submit].wpcf7-form-control.wpcf7-submit + span.ajax-loader').remove();
}
}
}
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment