Work with legacy and simple sites using jQuery selectors, events, AJAX, effects, and plugins.
Lessons
Avoid XSS when injecting HTML and handling input.
jQuery Security is easiest to learn by reading the example, changing it, and observing the result.
const userInput = '<img src=x onerror=alert(1)>';
// Risky: .html() runs injected markup
// $('#out').html(userInput);
// Safe: .text() escapes the content
$('#out').text(userInput);Practice the jQuery Security example in a small scratch file, then explain what changed and why.