jQuery on Rails: A (Still Very Alpha) Update

I've made a number of updates to my preliminary release of jQuery on Rails:

And the big news...

I've written a few proof of concept helpers for jQuery on Rails that come with modules that are automatically installed in jquery_modules.

So far, I wrote one for a tabbed interface and one for sortable tables.

They both take the same settings as the underlying JavaScript libraries. For instance, you can set up the table sorter as follows:

<% sortable_table :sort_class_asc => "ascending", :sort_class_desc => "descending", :striping_row_class => ["even", "odd"], :stripe_rows_on_start_up => true do %> <thead> <tr> <th>Col 1</th> <th>Col 2</th> </tr> </thead> <tbody> <tr> <td>jQuery 1.0</td> <td>$100</td> </tr> <tr> <td>jQuery 1.1</td> <td>$59</td> </tr> <tr> <td>jQuery 1.1.1</td> <td>$68</td> </tr> <tr> <td>jQuery 1.1.2</td> <td>$8</td> </tr> </tbody> <% end %>

This corresponds to:

tableSorter({sortClassAsc: 'ascending', sortClassDesc: 'descending', stripingRowClass: ['even', 'odd'], stipeRowOnStartup: true})

You can check out both the tablesorter helper and the tabs helper in action by checking out the jQuery on Rails demo app.