This commit is contained in:
ekazak
2022-06-06 15:36:41 +03:00
parent ddbd9b0347
commit 2eaad2ba79
7 changed files with 94 additions and 38 deletions

View File

@@ -0,0 +1,24 @@
$(document).ready(function () {
$(".lc-subscrive-form").on("submit", function () {
var form = $(this)
var data = {email: form.find("#subscribe-email").val(), formId: form.find("#subscribe-from-id").val()}
$.ajax({
url: form.attr('action'),
type: 'POST',
data: JSON.stringify(data),
contentType: 'application/json',
dataType: 'json',
success: function (data) {
if (data.success) {
msg = "<b>Almost finished...</b><br/><br/>We need to confirm your email address.<br/><br/>To complete the subscription process, please click the link in the email we just sent you."
customAlert(msg);
}
form[0].reset()
},
error: function (jqXHR) {
console.log(jqXHR)
}
});
return false;
})
});