What Is jQuery?
What is jQuery, and what can you do with it? This article provides a gentle introduction to jQuery and its uses.
To kick off the series, this article explains what jQuery is, and the kinds of things you can use it for.
So what is jQuery exactly?
The jQuery library actually comes in 2 forms:
- The uncompressed
.jsfile is easy to read and modify, but it's around 160kb in size (at the time of writing).
- The minified
.jsfile has all comments, whitespace, and other unnecessary characters removed from the file, squeezing the whole library into a mere 23kb. Although you can't easily read the code, this is the version you'll want to place on your site, as it's much quicker for visitors to download.
jQuery is free to download and use, and is dual-licensed under the MIT and GPL licenses.
As well as the jQuery library itself, hundreds of jQuery plugins are available to add even more power and functionality to your scripts.
What can you do with jQuery?
- Adding animated effects to elements. jQuery lets you easily add effects such as fading in/out, sliding in/out, and expanding/contracting.
- Manipulating the DOM. You can easily add, remove, and reorder content in the Web page using just a couple of lines of code.
- Creating image slideshows. You can use jQuery effects to build nice animated slideshows and lightboxes.
- Making drop-down menus. jQuery makes it easy to create multi-level dropdowns with animations.
- Creating drag-and-drop interfaces. Use jQuery to build a page with elements that can be repositioned or reordered simply by dragging and dropping.
- Adding power to forms. With jQuery you can easily add complex client-side form validation, create auto-complete Ajax text fields that pull data from a server-side database, and so on.
This article has given you a brief overview of jQuery. You've learned that:
- jQuery is great for things like animations, Ajax requests, DOM manipulation, image effects, and user interface elements.
In my next article I'll show how to get started using jQuery. Until then — have fun!
Responses to this article
2 responses (oldest first):
I confess I've not read any jQuery books myself, but I've heard good things about jQuery Cookbook:
Post a response
Want to add a comment, or ask a question about this article? Post a response.
To post responses you need to be a member. Not a member yet? Signing up is free, easy and only takes a minute. Sign up now.