Work with legacy and simple sites using jQuery selectors, events, AJAX, effects, and plugins.
Lessons
Add, complete, and remove tasks with jQuery.
Build a To-Do App is easiest to learn by reading the example, changing it, and observing the result.
$('#add').on('click', function () {
const text = $('#task').val().trim();
if (!text) return;
$('#tasks').append(`<li>${text} <button class="del">x</button></li>`);
$('#task').val('');
});
$('#tasks').on('click', '.del', function () {
$(this).parent().remove();
});Practice the Build a To-Do App example in a small scratch file, then explain what changed and why.