Last active
September 3, 2019 05:05
-
-
Save maksimerohin/757ec923a2aa26b2f0c4f4b9eb164101 to your computer and use it in GitHub Desktop.
События для контактных форм Contact Form 7
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
document.addEventListener( 'wpcf7mailsent', function( event ) { | |
if ( '376' == event.detail.contactFormId ) { | |
$('#contact-modal .form').slideUp(function() { | |
$('#contact-modal .result').slideDown(); | |
}); | |
console.log("FORMSENT"); | |
yaCounter51427798.reachGoal('FORMSENT'); | |
}; | |
}); | |
document.addEventListener( 'wpcf7mailsent', function( event ) { | |
if ( '376' == event.detail.contactFormId ) { | |
$('#contact-modal .form').slideUp(function() { | |
$('#contact-modal .result').slideDown(); | |
}); | |
try { | |
yaCounter51427798.reachGoal('FORMSENT'); | |
} catch(e) { | |
alert('Ошибка ' + e.name + ":" + e.message + "\n" + e.stack); // (3) <-- | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment