Created
January 4, 2021 11:41
-
-
Save tomaskavalek/8a09d94c2fbfaad582af8f9208e96649 to your computer and use it in GitHub Desktop.
WordPress Contact Form 7 + Invisible reCAPTCHA – Removing duplicate ajax-loader
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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