Selecting one or several DOM elements to do something with is one of the most basic elements of jQuery. The equivalent to $()
or jQuery()
in JavaScript is querySelector()
or querySelectorAll()
, which, just like with jQuery, you can call with a CSS selector.
// jQuery, select all instances of .box
$(".box");