# jQuery

> A JavaScript tool that makes it quick to find and change parts of a web page.

**Field:** Software Development  
**Category:** Web Development  
**Also known as:** jQuery Library, $(), jQuery JS

## Think of it like

It is like a remote control for the page. One short press does a long job.

## Definition

jQuery is a free JavaScript library that makes it short to find and change parts of a web page. You find elements with $ and a CSS selector, like $(".btn"). Then one short call can hide them, change them or react to clicks. It also smooths over the ways old browsers differ. Newer browsers now do most of this on their own, but many sites still use it.

## Example

Lucy takes over an old shop site. Its code is full of $(...) calls, so she learns enough jQuery to fix the menu.

## Example code

```javascript
$(".btn").on("click", function () {
  $("#menu").toggle();
});
```

Now each thing with the class btn opens and shuts the menu when you click it.

## Why it matters

You will meet it in a huge number of older sites. Knowing it helps you read and fix them.

## Common mistake

Adding it to a new project just to find parts of the page. Plain JavaScript now does that with querySelector.

## Three principles

- **Find with $.** Pass a CSS selector to $().
- **Short calls.** One line hides, shows or changes.
- **Common in old sites.** New sites rarely need it.

## Related terms

- [JavaScript](https://learn.benibix.com/term/development/javascript)
- [Document Object Model (DOM)](https://learn.benibix.com/term/development/dom)
- [CSS Selector](https://learn.benibix.com/term/development/css-selector)
- [Browser Event](https://learn.benibix.com/term/development/browser-event)

## Told apart from

- [jQuery vs JavaScript](https://learn.benibix.com/compare/jquery-vs-javascript): People think jQuery is a language of its own, and it is not. JavaScript is the language that runs in every browser. jQuery is a library written in JavaScript. It is a set of short helpers to find and change parts of a page. Any jQuery line is JavaScript underneath.

![Two panels. On the left, jQuery: the line $(".btn").hide() finds every button with the class btn on the page and hides it. On the right, GSAP: the line gsap.to(".box", { x: 100, duration: 1 }) moves a box 100 pixels to the right over one second, drawn as a box sliding along a time line from 0 to 1 second.](https://learn.benibix.com/diagrams/dev5-front-end-libs.svg)

---

Source: https://learn.benibix.com/term/development/jquery
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
