Work with legacy and simple sites using jQuery selectors, events, AJAX, effects, and plugins.
Lessons
Serialize and post a form without a page reload.
Submitting Forms with AJAX is easiest to learn by reading the example, changing it, and observing the result.
$('#contact').on('submit', function (event) {
event.preventDefault();
$.ajax({
url: $(this).attr('action'),
method: 'POST',
data: $(this).serialize() // name=value&name=value
}).done(function () {
$('#status').text('Message sent!');
});
});Practice the Submitting Forms with AJAX example in a small scratch file, then explain what changed and why.