On Mar 19, 8:17 pm, "P.J." <[email protected]> wrote:
> When using "$.noConflict();" you need to load Prototype before loading
> jQuery. The <script> tag for Prototype literally needs to be above the
> <script> tag for jQuery.

No, you don't. The order doesn't matter, as long as if you load jQuery
first, you make the `noConflict` before you load Prototype, e.g.:

    <script src='jquery.js'></script>
    <script>jQuery.noConflict();</script>
    <script src='prototype.js'></script>

Examples:
jQuery first: http://jsbin.com/acehi5
Prototype first: http://jsbin.com/acehi5/2

Those also demonstrate how you can keep using `$` within jQuery-
specific code without running into trouble using `$` elsewhere with
Prototype code. But you only want to do that with they won't be
intermixed; otherwise, best to stick to using the `jQuery` symbol or
(as you said) one you assign yourself by grabbing the return value of
`noConflict`.

Best,
--
T.J. Crowder
Independent Software Engineer
tj / crowder software / com
www / crowder software / com

On Mar 19, 8:17 pm, "P.J." <[email protected]> wrote:
> When using "$.noConflict();" you need to load Prototype before loading
> jQuery. The <script> tag for Prototype literally needs to be above the
> <script> tag for jQuery.
>
> When using noConflict I find the most useful way of separating the two
> libraries logically is to assign jQuery a new name.
>
> For instance:
>
> var $j = jQuery.noConflict();
> // Do something with jQuery
> $j("div p").hide();
> // Do something with Prototype
> $("content").hide();
>
> I have a project called Modevious that specifically uses Prototype and
> jQuery together (along with other plugins and components) and it
> separates the two like so ($ for Prototype and $j for jQuery, and $c
> for my own library).
>
> When using Prototype $ works just as expected, but when using jQuery
> you must use $j. jQuery plugin authors are usually good about
> encapsulating their plugin so that even though their code may specify
> $ jQuery does a good job working with that and they are accessible via
> $j.
>
> For instance Pines Notify is by default $.pnotify("Message"). But when
> using Modevious or simply noConflict like above it is called by using
> $j.pnotify("Message").
>
> Hope that helps you use two wonderful libraries together.
>
> On Mar 16, 1:36 pm, Joseph O <[email protected]> wrote:
>
>
>
>
>
>
>
> > This has been tossed around the net in many variations yet none have
> > worked for me. I have done about ever work around for these two so
> > they will like each other and have reached a dead end. I need my image
> > fade menu to function with my flash driven lightbox. Please let me
> > know if this is something anyone can help with. Here are a few links
> > to reference.
>
> > This shows the menu 
> > working.http://fabritechonline.com/content/awning_marquee.html
>
> > This shows the Lightbox 
> > Working.http://fabritechonline.com/content/awning_marquee_test.html
>
> > This shows the jQuery / Prototype noConflict script in action.
> > (Prototype is 
> > disabled)http://fabritechonline.com/content/awning_marquee_test_conflict.html
>
> > While the script allows jQuery to operate without Prototype loading,
> > it still does not function with both.

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" 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/prototype-scriptaculous?hl=en.

Reply via email to