$(document).ready(function() {
//E-mail Ajax Send
$("form").submit(function() {
var th = $(this);
$.ajax({
type: "POST",
url: "php/mail.php",
data: th.serialize(),
success: function(data) {
th.parent().find(' input[type=text], input[type=tel], input[type=email], textarea').val('');
ym(XXXXXXXX, 'reachGoal', 'TARGET');
ga('send', 'event', 'submit', 'TARGET');
}
}).done(function() {
$(".form_info").addClass("form-info-open");
setTimeout(function() {
// Done Functions
th.trigger("reset");
}, 1000);
setTimeout(function(){
$('.form_info').removeClass('form-info-open');
}, 10000)
});
return false;
});
});