I am one of the many people who have fallen in love with jQuery over the past year or two. I haven’t seen it articulated why this might be, so here’s my stab at it.
So why do such people (including myself) find jQuery so appealing? I believe it’s because jQuery works in a metaphor that we server types understand: identify, and manipulate.
jQuery is comfortable for database types because it is a set (or selection) language. It provides a clear, flexible, unambiguous way of identifying the things you’d like to manipulate.
You can select them individually (via id) or as a group (by class or element type). You can do intersections (give me all things that are paragraphs and also of class x), unions (give me everything that’s a button or a link) and filters (give me all checkboxes that are checked). You can combine these sets ad hoc, in one concise statement. It is, indeed, a query.
Then, you have a well-defined set of verbs (methods) by which you can act on the elements you’ve selected. You can hide them, move them, re-style them with clear commands. You can change their attributes, mark them up, and come back to them later.