Skip to content

Instantly share code, notes, and snippets.

@jdmgarcia
Forked from lucas-pelton/blockClicks.js
Created September 19, 2017 14:13
Show Gist options
  • Save jdmgarcia/708f5265ade00859116974bbb6f0950a to your computer and use it in GitHub Desktop.
Save jdmgarcia/708f5265ade00859116974bbb6f0950a 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