Any jQuery users out there? I would like to learn more about incorporating jQuery with Rails as the performance seems to be the best of any library I've seen and it is great in separating the JScript from the HTML. Any suggestions on where to get started? I've read this (http://b.lesseverything.com/2006/12/31/making-jquery-and- prototype-play-nice-in-rails) but was looking into some more. Also UJS looks interesting and has greater support - are more people using this?
on 2007-03-19 23:17
on 2007-03-20 14:26
Just wanted to mention that by saying UJS has greater support I mean in Rails. jQuery has many more resources and valuable results with a simple Google search.
on 2007-05-09 18:13
Shai, I prefer jQuery to Prototype in rails apps, but it is getting to be a burden to integrate some things. Some of my latest code seems hacky, but I really dislike "onclick" event bindings! I posted a similar question a few months back (I think there was talk of a jQrails or something similar) but I haven't found anything so far.
on 2007-05-09 21:42
I'm currently using both Prototype and JQuery in the same Rails app. Not really something I'd recommend, but my designer (my wife) wrote a bunch of the webapp using JQuery before I ever touched it with Rails (including Thickbox functionality), so in the interest of time, I kept her code (heh - she also insisted that I keep it) and later on in the process I found that I wanted to use some Prototype stuff as well. I found this article to be helpful: http://docs.jquery.com/Using_jQuery_with_Other_Libraries In each file and/or block using jquery code, I used a line like var $j = jQuery.noConflict(); And then I replaced each $ with $j. It was tedious, and I had to modify the thickbox.js as well, but it all works together now. Again, I don't recommend using jquery and prototype at the same time unless your wife decides that you will. :) On 5/9/07, John Lauck <email@example.com> wrote: > On 3/20/07, Shai Shefer <firstname.lastname@example.org> wrote: > > > > > > Just wanted to mention that by saying UJS has greater support I mean > > in Rails. jQuery has many more resources and valuable results with a > > simple Google search. > > > > > > > > > > -- Terry (TAD) Donaghe http://tadspot.tumblr.com