Work with legacy and simple sites using jQuery selectors, events, AJAX, effects, and plugins.
Lessons
Translate common jQuery patterns to plain JavaScript.
jQuery to Vanilla JS is easiest to learn by reading the example, changing it, and observing the result.
// jQuery
$('.btn').on('click', () => $('#out').text('clicked'));
// Modern vanilla JavaScript equivalent
document.querySelectorAll('.btn').forEach(btn => {
btn.addEventListener('click', () => {
document.querySelector('#out').textContent = 'clicked';
});
});Practice the jQuery to Vanilla JS example in a small scratch file, then explain what changed and why.