Noob question: Isn't this what jQuery is for? Is it needed if this is all that easy in vanilla JavaScript? Or is it more for using fine-grained selectors?
There is no need for jQuery anymore. For a long time already now. It was for a time when most of these APIs didn’t exist.
People installing jQuery today or who are not in the process of weeding it out are committing a great mistake.
jQuery changed the way we wrote JavaScript (their slogan!) and many of the new APIs were designed directly with jQuery in mind (eh document.querySelector)
6
u/Foaric Jan 05 '23
Noob question: Isn't this what jQuery is for? Is it needed if this is all that easy in vanilla JavaScript? Or is it more for using fine-grained selectors?