Download and Local Setup of jQuery
- Visit the official jQuery website: jquery.com/download
- Choose the latest version – either:
- Compressed (minified):
jquery-3.x.x.min.js– for production - Uncompressed:
jquery-3.x.x.js– for development and debugging
- Compressed (minified):
- Click to download and save the file into your project directory (e.g.,
js/folder)
my-project/
├── index.html
└── js/
└── jquery-3.7.1.min.js
This keeps your jQuery file organized in a js folder.
Add the following <script> tag before the closing </body> tag in your HTML file:
<script src="js/jquery-3.7.1.min.js"></script>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>jQuery Local Setup</title>
</head>
<body>
<button id="btn">Click Me</button>
<script src="js/jquery-3.7.1.min.js"></script>
<script>
$(document).ready(function() {
$("#btn").click(function() {
alert("Button Clicked!");
});
});
</script>
</body>
</html>
- Works offline without internet
- No dependency on external servers
- Full control over versioning
- Safer for private intranet or offline apps


