On Feb 6, 11:44 am, Ralph Shnelvar <[email protected]> wrote:
> > Note: you may encounter conflicts if you are using Prototype and Jquery
> > together. In that case, use
> > *********************************************************
> > jQuery.noConflict(); and then instead of "$" use "jQuery"
> > *********************************************************
>
> Somethng I am using ... validates_captcha ... uses Prototype.
>
> Hmm ... I wonder if this explains the odd behavior I am seeing when I
> tried to use the jQuery plugin, IconDock:
> http://icon.cat/wiki/IconDock_En#iconDock_jQuery_Plugin
>
> So ... I read
> http://docs.jquery.com/Using_jQuery_with_Other_Libraries
> and my question is: What are the odds that there will be a conflict?
>
> How can I find out definitely if validates_captcha conflicts with
> jQuery?
> --
> Posted viahttp://www.ruby-forum.com/.
Well if you're observing validates_captcha acting odd when you're
using jQuery, or vice-versa, you've found out....
Another easy way to avoid conflict between the various JS libraries is
to do something like this:
jQuery.noConflict();
(function($) {
.... //jquery code goes here, allowing you to use $ willy-nilly...
})(jQuery);
you'll need to make sure that the jQuery.noConflict() call comes
*before* any code using Prototype or whatever runs (as
validates_captcha uses the inline rjs helpers this shouldn't be a
concern, but I've yet to actually *use* validates_captcha so you'll
see)
Completely offtopic though, I find jQuery overwhelmingly useful and
intuitive. Granted, while its more just a "DOM manipulation, ajax and
effects" library where Prototype is a general purpose Javascript
framework, Javascript's *soo* flexible and powerful that a library
adding class-based inheritance and enumerators everywhere often gets
in the way of the "Javascript-way" of doing things.
--
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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.