Integrating jQuery and Rails: use unobtrusive Javascript instead of view helpers
The jQuery Way to apply behavior to a document is to add it unobtrusively via the $(document).ready() function, ideally in an external script file… unlike the Rails Way, which is to add behavior to individual elements via inline Javascript, using the built-in view helpers.
The markup generated by these helpers is obtrusive, and often repetitive. For [...]