0
0
This repository has been archived on 2020-08-03. You can view files and clone it, but cannot push or open issues or pull requests.
bryanpedini.it_old/js/onePageApp-contactForm.js

25 lines
948 B
JavaScript

(function ($) {
$(function () {
$('#contact-form-send').click(function () {
$.ajax({
url: 'contactme/webform.php',
method: 'POST',
datatype: 'JSON',
data: {
name: $('#contact-form-name').val(),
email: $('#contact-form-email').val(),
message: $('#contact-form-message').val()
},
success: function () {
console.log( 'I ran the ajax request successfully' ); // debug purposes
}
});
});
$("#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);