Work with legacy and simple sites using jQuery selectors, events, AJAX, effects, and plugins.
Lessons
Refer to the current element inside handlers.
The this Keyword is easiest to learn by reading the example, changing it, and observing the result.
$('p').css('color', 'gray'); // all paragraphs
$('#main').addClass('active'); // by id
$('.card').fadeIn(); // by class
$('input[type="email"]').focus(); // by attribute
$('.item').on('click', function () {
$(this).toggleClass('selected'); // 'this' is the clicked element
});Practice the The this Keyword example in a small scratch file, then explain what changed and why.