<script type="text/javascript" src="/path/to/jquery.js"></script>
<!-- Add in any jQuery plugins here while $ still refers to jQuery -->
<script type="text/javascript">$j = $.noConflict();</script>
<script type="text/javascript" src="/path/to/prototype.js"></script>
<!-- Add any Prototype extensions -->
When you want to use jQuery, use the replaced shortcut call to $j
(this is an arbitrary reassignment - could be anything that
distinguishes it from Prototype's $). Prototype's $ here replaces
jQuery's.
Anything you use to extend jQuery you should load before reassigning
jQuery's $ (i do it for safety, and clarity in my code). Then after
the reassignment, load Prototype and any of its extensions.
i use this setup reliably in my code. Maybe there's more to it than
that, but i have yet to encounter a situation where there's been a
conflict.
-joe t.