On Nov 12, 10:48 am, "César"
<cesare.d...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Hi,
> have somebody experience using JQuery in an application Ror join to
> prototype?
> somebody knows if is possible use Prototype and JQuery all together?
>
> I am trying implement drag and drop effects in a table but nothing
> is happening.
Do you really need both prototype and JQuery? In general, if you can
keep it all in one JS framework your app will be easier to build and
maintain.
You can do drag-and-drop with Prototype and Scriptaculous. DevArticles
has an excerpt from the book Ajax on Rails which explains drag-and-
drop:
http://www.devarticles.com/c/a/Ruby-on-Rails/Drag-and-Drop-with-scriptaculous-and-Rails/
If for some reason you must have only the JQuery version of drag-and-
drop, you may want to investigate using JRails (http://ennerchi.com/
projects/jrails) so that the rest of your Rails helpers are
implemented in JQuery, and then you don''t need prototype.
Lastly, if it turns out that you absolutely have to have both
libraries, there is a no-conflict mode in JQuery that makes it
possible. Out of the box, prototype and JQuery don''t work together
because they both define the $() function. If you call
jQuery.noConflict(), then you can use jQuery() instead of $(). Note
that this means you''ll have to translate any jQuery code you copy from
other sources. More details here:
http://docs.jquery.com/Using_jQuery_with_Other_Libraries
-- Mark.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---