Introduction to jQuery
Harry
· 11 Sep 2026
· 11 views
Write Less, Do More
jQuery is a fast, small, feature-rich JavaScript library that simplifies HTML document traversal and manipulation, event handling, animation and AJAX. Created by John Resig in 2006, it became the most popular JavaScript library in the world and still runs on a huge share of the web.
What jQuery Solves
- Cross-browser consistency: one API that behaves the same everywhere.
- Concise selectors: reuse CSS selector syntax to reach elements.
- Chaining: call several methods on one selection in a single expression.
- AJAX made easy: a few lines replace gigabytes of XMLHttpRequest boilerplate.
- Animation: show, hide, fade and slide with one method call.
A First Taste
<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
<script>
$(document).ready(function () {
$('#greeting').text('Hello from jQuery!');
});
</script>The $ function is the jQuery workhorse. $(document).ready(fn) runs fn once the DOM is ready - the safe way to start your code.
jQuery Today
Modern browsers and vanilla JavaScript have narrowed the gap, and frameworks like React and Vue dominate new builds. jQuery remains essential for maintaining existing sites, WordPress themes, plugins and quick interactive pages.
Key Points
- jQuery simplifies DOM work, events, animation and AJAX.
- The
$alias wraps seamless, chainable methods. - It is still everywhere on the web, especially in WordPress and legacy sites.
- Learn it for maintenance, speed of development and its classic patterns.