Guide · Open source
How to use youmightnotneedjquery: clone, build and read the examples
Updated · written with AI from the project's own documentation and checked against our catalogue data
youmightnotneedjquery is a reference website from HubSpot that shows common jQuery tasks, such as selecting elements or making requests, next to plain JavaScript alternatives. This guide explains what the repository contains, how to build it locally with Node.js, and how to use it to decide whether a project still needs jQuery. It is aimed at developers who already know some JavaScript and the DOM.
Quick start
- 1Check Node.js. Confirm Node.js is installed, since the README says building the project requires it.
- 2Clone the repository. Run git clone on the HubSpot/youmightnotneedjquery repository to get a local copy.
- 3Install dependencies. In the project directory, run npm install.
- 4Start the watch build. Run npm run dev to build the project and watch for changes.
- 5Or build once. Run npm run build if you want a single build without watching.
- 6Compare the examples. Open the section you need and compare the jQuery file with the plain JavaScript file for your target browser.
What youmightnotneedjquery is and who it is for
The project is a resource for doing things au naturel, meaning without jQuery. It is useful for developers deciding whether they still need the library in a given project.
It is a reference site, not a package. You do not install it into an app the way you would install a library or framework.
- Front-end developers maintaining older sites that still use jQuery
- Developers learning standard browser JavaScript APIs
- Teams deciding whether a jQuery dependency is worth keeping
- Developers who need to support older Internet Explorer versions and want the matching snippet
Clone the repository and install dependencies
You need Node.js installed. Clone the repository, then move into the project directory and install its dependencies with npm.
- Prerequisite: Node.js
git clone https://github.com/HubSpot/youmightnotneedjquery.git
npm installBuild the site and watch for changes
Run the dev command to build the project and watch for changes while you edit. Use the build command when you only want a one-off build without watching.
npm run dev
npm run buildRead the examples for each browser target
Each section of the reference is a folder containing a jquery.js file that shows the jQuery version of a task, plus one or more plain JavaScript files for different browsers: ie8.js, ie9.js, ie10.js, ie11.js and modern.js (for Chrome, Safari and Firefox), added as needed.
When a folder has several files, the one shown depends on the browser support you need. For example, if a section has ie8.js and ie9.js, the ie9 version is shown to people looking for a solution that works in IE9, IE10, IE11 or modern JavaScript.
- jquery.js: the jQuery version of the task
- ie8.js to ie11.js: plain JavaScript for those Internet Explorer versions
- modern.js: plain JavaScript for Chrome, Safari and Firefox
Add a new section to the reference
To add a new section, create a folder for it and add the files described above as needed. The README is the source for this workflow, so check it for any further conventions before you contribute.
- Create a new folder for the task
- Add jquery.js and the relevant ie8.js to ie11.js or modern.js files
- Run npm run dev to check the result locally
What people use it for
- Checking the plain JavaScript equivalent of a jQuery selector or AJAX call before removing jQuery from a site
- Finding the IE9 or IE10 snippet when a legacy site must still support older Internet Explorer versions
- Showing a team the jQuery and vanilla versions of common tasks when deciding whether to keep the dependency
- Learning standard browser JavaScript APIs by reading side-by-side examples
Frequently asked questions
Is youmightnotneedjquery free to use?
The repository is licensed under MIT, according to its listing. Check the LICENSE file in the repository for the full terms before reusing material.
Do I need to install youmightnotneedjquery as a library?
No. It is a reference website, not a package. You clone the repository and build it locally with Node.js if you want to run it yourself.
What do I need to run youmightnotneedjquery?
The README says building the project requires Node.js. You then run npm install, followed by npm run dev or npm run build.
Why do the examples include ie8.js, ie9.js and other files?
Each file shows a plain JavaScript version for a browser range. The ie8 to ie11 files target older Internet Explorer versions, and modern.js targets Chrome, Safari and Firefox.
Is youmightnotneedjquery a good alternative to jQuery?
It is not a replacement library. It helps you see how to do common jQuery tasks with standard JavaScript, so you can decide whether a project still needs jQuery.
How does it compare with MDN Web Docs or You Don't Need jQuery?
MDN Web Docs provides vanilla JS examples as part of its documentation, and You Don't Need jQuery is another comparable resource. youmightnotneedjquery focuses on side-by-side jQuery and plain JavaScript examples with browser-specific variants.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Use youmightnotneedjquery if you maintain a site that still uses jQuery, want to learn standard browser APIs, or need an IE8 to IE11 snippet. Skip it if you want a ready-to-install library or framework, or if you are a beginner without JavaScript and DOM basics, since the examples assume that background.
Install options & downloads