They’re mature, stable libraries, and that’s great! But without a major release from them in almost 3 years, alternatives like jQuery (and jQuery UI) have surpassed them in (no particular order): performance, community, training, corporate adoption, ease of use and mobile vision.
So what does this have to do with Rails 3?
link_to_remote() actually outputs
<a href="#" onclick="new Ajax.Updater();"> which references the
data-* attributes from HTML5 and event listeners. Out of the box, those listeners are based on the Prototype API.
(In Part 1, we created a new Rails application and excluded Prototype & Scriptaculous from our project.)
To use jQuery instead, you just need to:
- Download the jQuery adapter from http://github.com/rails/jquery-ujs/raw/master/src/rails.js and save it to the
Let’s save our progress again and commit our changes in Git:
(Feel free to fork my Github repository if you’d like to follow along athttp://github.com/defeated/wisdombiscuit)