Created
April 27, 2018 17:08
-
-
Save simonmorley/c477ed38955dfb6d809b31d6d657c096 to your computer and use it in GitHub Desktop.
Revisions
-
simonmorley created this gist
Apr 27, 2018 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,24 @@ <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>