Skip to content
Justice Tech School

jQuery versus Plain JavaScript

Modern JavaScript has querySelector, classList and fetch, so many jQuery tasks are now one line of vanilla code. jQuery still helps with old projects and plugins.

Example
// jQuery
$('.card').addClass('on');

// vanilla
document.querySelectorAll('.card').forEach((el) => el.classList.add('on'));

Exercise

Vanilla selector method.

document.('.card')

Quiz Test

Is jQuery required today?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.