adding in the basic testimonials and all

This commit is contained in:
Arjun Patel
2019-02-25 00:18:46 -08:00
parent 4ebde0907f
commit 62e86b115e
12 changed files with 154 additions and 219 deletions
+19 -11
View File
@@ -12,24 +12,32 @@ $(document).ready(function() {
$('#email-form').submit(function(e) {
e.preventDefault();
$('#popup')
.text('Added to list! Thank you for joining!')
.slideDown()
.delay(4000)
.slideUp();
$.ajax({
url: 'https://ucharify-api.herokuapp.com/api/users/landing',
type: 'post',
data: $('#email-form').serialize(),
success: function(data) {
//whatever you wanna do after the form is successfully submitted
$('#popup')
.text('Added to list! Thank you for joining!')
.slideDown()
.delay(4000)
.slideUp();
// whatever you wanna do after the form is successfully submitted
// $('#popup')
// .text('Added to list! Thank you for joining!')
// .slideDown()
// .delay(4000)
// .slideUp();
console.log('successfully added email');
},
error: function(error) {
$('#popup')
.text('Email invalid or exists')
.slideDown()
.delay(4000)
.slideUp();
// $('#popup')
// .text('Email invalid or exists')
// .slideDown()
// .delay(4000)
// .slideUp();
console.log('invalid or exists email');
}
});
});