📡 You're offline — showing cached content
New version available!
Quick Access
Tutorials jQuery in Practice Including jQuery

Including jQuery

4 min read
Add jQuery to a page with one script tag from a CDN. Use the slim build when you only need DOM and events to save bandwidth. Always verify it loaded by typing jQuery in the browser console.

Including jQuery

CDN (recommended)

<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>

npm

npm install jquery
// import
import $ from 'jquery';

Verify it works

$(function() {
  console.log('jQuery', $.fn.jquery, 'ready!');
});