Javascript and jQuery same?

Hello campers,
I tried adding a functionality to a page with javaScript and I couldn’t but through research I was able to achieve it with jQuery. Is it safe to say I achieved it with javaScript? Is it possible some functionalities may not be available with vanilla javaScript as every search keeps taking me back to jQuery? (Sorry if my question sound too naive but I need to know so I can figure out this confusion in my head.)

jQuery is a library written in JS. It is JS. Most of what it does has now been absorbed into functions that browsers make available, eg

$('.selector') -> document.querySelector('.selector')
// or if there are many
$('.selector') -> document.querySelectorAll('.selector')

$.ajax() -> fetch()

Have you tried searching “thing I want to do -jQuery” (eg remove jQuery-related results from the search), or “thing I want to do JavaScript”

1 Like

JQuery is a JavaScript library that everybody used to use. It’s no longer as ubiquitous, but you’ll still find it in top search results.

I did, maybe I will check more.

The functionality is to toggle my nav <a> links to show/hide its contents within same page.
I searched and tried for almost 2days only to solve it with jQuery. That got my curiosity high

I agree. My aim though is to practice vanilla javascript so I still wish I can achieve same with vanilla js.