So I just switched over one of our projects to jQuery this weekend, to see what all the hype is about. It’s pretty good. Most notable is that jQuery $() is the same as Prototype $$() [find by CSS selector]. There seems to be no equivalent to Prototype’s $() [find by dom id]. The switch is as simple as adding # [dom id selector] in front of your old prototype $() methods.
jRails is pretty good, I’d say it was 95% plug and play. Just a few quirks where I had to modify some parameters to my helper method calls.
I just cooked up some flexible zebra striping for prototype. I call it ...drumroll please… ProtoStripe!
badum-ching! ;)
// protostripe.js
Event.observe( window, 'DOMContentLoaded', function() {
$$('.striped').each( function(e) {
Selector.findChildElements(e, ['tr','li']).each( function(e, idx) {
e.addClassName( idx % 2 == 1 ? 'odd' : 'even');
});
});
});
Just include it in your HTML header, and any tables or lists with class=”striped” will have their appropriate children decorated with “odd” and “even” CSS classes. Unobtrusive JavaScript rocks! :)

