
jQuery makes many tasks easier. Its simplistic, comprehensive API has the ability to completely change
the way you write JavaScript, with the aim of consolidating and eliminating as many common and
redundant tasks as possible. jQuery really shines in the following areas:
- jQuery makes iterating and traversing the DOM much easier via its various built-in methods for doing the same.
- jQuery makes selecting items from the DOM easier via its sophisticated, built-in ability to use selectors, just like you would use in CSS.
- jQuery makes it really easy to add your own custom methods via its simple-to-understand plug-in architecture
- jQuery helps reduce redundancy in navigation and UI functionality, like tabs, CSS and markup-based pop-up dialogues, animations, and transitions, and lots of other things.
jQuery won’t do your laundry, walk the dog, or broker world peace (yet), but it does bring a lot to the
table in terms of making client-side website development easier.
Is jQuery the only JavaScript framework? — no, certainly not. You can pick from several JavaScript
frameworks: base2, Yahoo UI, Prototype, SproutCore, Dojo, and so on. I picked jQuery for this book
simply because I enjoy its simplicity and lack of verbosity. On the other hand, among the other frameworks,
you’ll find that there is a lot of similarity and each provides its own advantages in terms of unifying
Event APIs, providing sophisticated selector and traversal implementations, and providing
simple interfaces for redundant JavaScript-driven UI tasks.
In the past, I’ve been a big fan of base2, simply for its commitment to supporting W3C-sanctioned and
de facto standard APIs seamlessly. But I have decided to focus on jQuery exclusively and exhaustively
for this book because I think its popularity merits comprehensive coverage, which I’m able to present in
a way that is more befitting novice programmers.
In a nutshell, jQuery blurs and even erases lines in some places that existed as barriers for true crossbrowser,
cross-platform development. It gives you a standard Event API, a standard Selectors API, useful
traversal and enumeration methods, and a very useful UI library that work across the board in
Internet Explorer, Safari, Firefox, and Opera on Windows, Mac, and Linux platforms.
That’s not to say that you won’t ever encounter cross-browser issues with your programs, but jQuery
makes it much less likely and eliminates a hefty chunk of compatibility issues.