Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // отправка формы на сервер
- $(".button-popup").magnificPopup();
- $(".ajax-form").submit(function() {
- var th = $(this);
- $.ajax({
- type: "POST",
- url: "mail.php",
- data: th.serialize()
- }).done(function() {
- alert("Спасибо за заявку!");
- setTimeout(function() {
- th.trigger("reset");
- $.magnificPopup.close();
- }, 1000);
- });
- return false;
- });
Add Comment
Please, Sign In to add comment