jQuery and MooTools are 2 great javascript frameworks that allow you to incorporate some really fancy effects on your website. I was using them while I realised that I had to use both of them on a single page at one point. I didn’t realise it then, and took me nearly an hour before I realised that the two frameworks were causing some conflicts. For me, I was trying out the accordion effect, and that caused a few compatibility issues — i.e. the javascript effects did not work at all.
<script type="text/javascript" src="jquery-1.3.2.js"></script>
<script type="text/javascript">
jQuery.noConflict();(function($) {
/*whatever jQuery stuff*/
})(jQuery);
</script><script type="text/javascript" src="moo1.2.js"></script>
<script type="text/javascript">
window.addEvent('domready',function() {
/*whatever MooTools stuff*/
});
</script>
Done!
By doing this and segregating your javascript effects, you can use both jQuery and MooTools together in a same page.









Wed, May 20, 2009
Tutorials & Tips