Created
April 27, 2018 17:08
-
-
Save simonmorley/c477ed38955dfb6d809b31d6d657c096 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
var email; | |
var origin; | |
var url = 'https://api.ctapp.io'; | |
var success = function() { | |
$('#success').removeClass('hide'); | |
$('#submit').prop('disabled', function(i, v) { return !v; }); | |
}; | |
$(document).on("submit", "#request", function( event ) { | |
console.log('APPLES') | |
event.preventDefault(); | |
var values = $(this).serialize(); | |
email = $('input[name="email"]').val(); | |
origin = $('input[name="origin"]').val(); | |
$.ajax({ | |
type: 'POST', | |
url: url + '/api/v1/person_timelines', | |
data: $(this).serialize(), | |
error: function(){ | |
}, | |
success: success, | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment