On Apr 23, 5:01 am, Sapphire <[EMAIL PROTECTED]> wrote:
> Has anyone figured out how to make jQuery play nice with 
> prototype/scriptaculous?

Play nice... no.  Get along... yes.

<!-- THESE MUST GO FIRST AND IN THIS ORDER -->
<script src="javascript/prototype.js" type="text/javascript"></script>
<script src="javascript/scriptaculous.js" type="text/javascript"></
script>
<script src="javascript/jquery.js" type="text/javascript"></script>
<script src="javascript/metadata.js" type="text/javascript"></script>
<script type="text/javascript">
        // <![CDATA[
        var $jquery = jQuery.noConflict();
        $jquery.meta.setType("class");
        // ]]>
</script>
<!-- END ORDER SPECIFIC LIBRARY -->

What I'm doing, and what seems to work so far, load prototype, then
third party libraries that are known to build off prototype directly,
then jQuery (which steals the $() function), load libraries that
require jQuery (like metadata), and then at the very last minute
unhook jQuery from the $() with .noConflict.

At that point I use $() for prototype and $jquery() for jQuery.  It
isn't pretty, but the other library calls seem to handle things
famously.

-wls
http://www.wwco.com/~wls/blog/2007/04/04/understanding-jquery/

Reply via email to