Answer the question
In order to leave comments, you need to log in
How to make the script separate for the block and not for all?
Good morning everyone! There is this script
$("form").submit(function() { //Change
var th = $(this);
$.ajax({
type: "POST",
url: "mail.php", //Change
data: th.serialize()
}).done(function() {
alert("Спасибо! Мы с вами свяжемся в ближайшее время!");
setTimeout(function() {
// Done Functions
th.trigger("reset");
}, 1000);
});
return false;
});
Answer the question
In order to leave comments, you need to log in
$("#elem form").submit(function() { //Change
var th = $(this);
$.ajax({
type: "POST",
url: "mail.php", //Change
data: th.serialize()
}).done(function() {
alert("Спасибо! Мы с вами свяжемся в ближайшее время!");
setTimeout(function() {
// Done Functions
th.trigger("reset");
}, 1000);
});
return false;
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question