0
0

Added PHP and javascript control for the contact form, moved javascript from template page to a dedicated script file

This commit is contained in:
Bryan Pedini
2019-01-21 00:15:52 +01:00
parent d4872fbed4
commit bc95c0ec7d
4 changed files with 58 additions and 12 deletions

View File

@@ -0,0 +1,22 @@
(function ($) {
$(function () {
$('#contact-form-send').click(function () {
$.ajax({
url: 'contactme/webform.php',
method: 'POST',
datatype: 'JSON',
data: {
name: $('#contact-form-name'),
email: $('#contact-form-email'),
message: $('#contact-form-message')
}
});
});
$("#scrolldown-button").click(function() {
$('html,body').animate({
scrollTop: $("#contact-form").offset().top
}, 'slow');
});
$("#contact-form-message").css('overflow', 'hidden').autogrow({vertical: true, horizontal: false, flickering: false});
});
})(jQuery);