diff --git a/index.html b/index.html index afaf54c..289d564 100644 --- a/index.html +++ b/index.html @@ -86,18 +86,17 @@
You can also send me an email at c.marcandre[at]gmail.com, or fill the form below!
- diff --git a/js/form-handling.js b/js/form-handling.js new file mode 100644 index 0000000..8a8bb11 --- /dev/null +++ b/js/form-handling.js @@ -0,0 +1,22 @@ +var $contactForm = $('#contactme'); + +$contactForm.submit(function(e) { + e.preventDefault(); + $.ajax({ + url: '//formspree.io/c.marcandre@gmail.com', + method: 'POST', + data: $(this).serialize(), + dataType: 'json', + beforeSend: function() { + $contactForm.append('