Skip to content

Instantly share code, notes, and snippets.

@pietromalerba
Forked from lucas-pelton/blockClicks.js
Created February 17, 2019 10:51
Show Gist options
  • Save pietromalerba/470999ca43d4e917938d55ebb0976482 to your computer and use it in GitHub Desktop.
Save pietromalerba/470999ca43d4e917938d55ebb0976482 to your computer and use it in GitHub Desktop.
Prevent multiple clicks and submissions in Contact Form 7
//http://epsiloncool.ru/programmirovanie/preventing-multiple-submits-in-contact-form-7
jQuery(document).on('click', '.wpcf7-submit', function(e){
if( jQuery('.ajax-loader').hasClass('is-active') ) {
e.preventDefault();
return false;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment