Work with legacy and simple sites using jQuery selectors, events, AJAX, effects, and plugins.
Lessons
Fire events programmatically with trigger().
Triggering Events is easiest to learn by reading the example, changing it, and observing the result.
function handleClick() {
console.log('clicked');
}
$('#btn').on('click', handleClick); // attach
$('#btn').off('click', handleClick); // remove
$('#once').one('click', () => console.log('runs only once'));
$('#btn').trigger('click'); // fire programmaticallyPractice the Triggering Events example in a small scratch file, then explain what changed and why.