Skip to content

A minor introduction to jQuery

I've been digging into JavaScript a lot lately, and recently started digging into a fantastic new jQuery book by Bear Bibeault and Yehuda Katz.

I'm pretty sure I've learned more in the first chapter than 5 chapters of another JS book.

jQuery prioritizes good practices
jQuery highly emphasizes unobtrusive javascript – something that's always good to get a refresher on … it's all too easy to cheat sometimes.
From the book: "At its core, jQuery focuses on retrieving elements from HTML pages and performing operations upon them."
Hmm, that sounds good to me.

jQuery wrapper, one badass object
This is how I thought of it. To keep things straight, jQuery functions are actually methods, meaning that as a library, it so jQuery has a big, badass object, $( ) to select items. This B.A. object also allows you to call on some great methods with a shorthand as simple as $.method( )
Wise move, non?

Extensibility FTW
As a Drupalista, this is one of those major appeals…plug-ins and the like. jQuery is easy to extend, and plays nicely with other libraries (except some that use similar core functionality, such as Prototype)
More sometimes can be better. But don't clutter the core.

While probably everyone on the web has realized the pros of jQuery by now, this is what I've been looking into lately. Who else is a major jQuery fan? What are your favorite resources?

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.