Do you still need jQuery, and what are the modern equivalents?
Quick Answer
For new projects, usually not — modern browsers have native equivalents for what jQuery solved: querySelector/querySelectorAll for selection, classList for classes, addEventListener for events, fetch for AJAX, and Promise/async-await. jQuery is still everywhere in existing ASP.NET MVC and Web Forms apps, so maintenance roles still use it.
For a new project I wouldn't add it. The things jQuery existed to smooth over — inconsistent selectors, class manipulation, AJAX, event binding — all have clean native APIs now: querySelectorAll, classList, addEventListener, fetch. But it's still in a massive number of ASP.NET MVC and Web Forms apps, and things like Bootstrap 4 and DataTables depend on it, so if I'm maintaining one of those I'll use it rather than fight it. It's a “don't add it, but don't rip it out for its own sake” situation.
| jQuery | Modern native |
|---|---|
$('.x') | document.querySelectorAll('.x') |
.addClass / .toggleClass | el.classList.add / .toggle |
.on('click', fn) | el.addEventListener('click', fn) |
$.ajax / $.getJSON | fetch(url).then(r => r.json()) |
.closest / .find | el.closest() / el.querySelector() |
$(document).ready | DOMContentLoaded or <script defer> |
What jQuery still gives you: terse chaining, cross-old-browser consistency, and a huge plugin ecosystem (including Bootstrap 4 and DataTables). If a codebase already loads it, using it is fine; adding it to a greenfield project is hard to justify.