var
form = $('form');
var
input = form.find('input[name="email"]');
var
action = form.attr("action");
var
msg = $('.message');
var
msgError404 = "Service is not available at the moment. Please
check your internet connection or try again later."
var
msgError503 = "Oops. Looks like something went wrong.
Please try again later."
var
msgErrorValidation = "This email address looks fake or
invalid. Please enter a real email address."
var
msgErrorFormat = "Your e-mail address is incorrect. Please
check it and try again."
var
msgSuccess = "Congrats! You are on list. We will inform
you as soon as we finish."
var
note = form.find(".note");
var
icon = $("i.fa fa-paper-plane");
var
iconProcess = "fa fa-spinner fa-spin";
var
email = input.val();
var
iconSuccess = "fa fa-check-circle";
var
iconError = "fa fa-exclamation-circle";
var re =
/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
has to be INSIDE the function.
var
email = input.val(); is getting the original HTML value, not the
value that I type in.
JΛ̊KE