I am trying to use both jQuery and Prototype at the same time.
I've spent hours and hours searching solutions to fix this problem. The most common method I found is this http://docs.jquery.com/Using_jQuery_with_Other_Libraries. However, it didn't work no matter how I place the "jQuery.noConflict()" code.
Can anyone help me with this?
Thanks in advance
Here is my code
<script type="text/javascript" src="/js/swfobject.js">
</script>
<script type="text/javascript" src="/js/layerswitch.js">
</script>
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-2351815-2";
urchinTracker();
</script>
<script type="text/javascript" src="/js/jquery-1.3.2.min.js">
</script>
<script type="text/javascript" src="/js/fadeLinks.js">
</script>
<script>
jQuery.noConflict();
jQuery(document).ready(function($){
$("#example").autocomplete(options);
});
</script>
<script src="js/prototype.js" type="text/javascript">
</script>
<script src="js/scriptaculous/scriptaculous.js" type="text/javascript">
</script>
<script src="js/recommended_items.js" type="text/javascript">
</script>
<script type="text/javascript">
//<![CDATA[
Event.observe(window, 'load', function() {
var recommended_items = new RecommendedItems('recommended_items', <?="$store_id, $gift_registry_id" ?>);
recommended_items.setBaseURL('<?=$site_server . SITE_STANDARD ?>');
<?php if (THIS_PAGE == PRODUCT_PHP) { ?>
recommended_items.setProduct(<?="$product_id, $category_id" ?>);
<?php } ?>
recommended_items.fetchItems();
});
//]]>
</script>