代码改变世界

[转]MooTools与JQuery共存

2011-10-21 23:03  cs88dn  阅读(579)  评论(0)    收藏  举报

jQuery sets this paragraph's color to red but MooTools sets the border color.

  <script type="text/javascript" src="jquery-1.3.js"></script>
  <script type="text/javascript">
   //no conflict jquery

    jQuery.noConflict();
   //jquery stuff

    (function($) {
      $('p').css('color','#ff0000');
    })(jQuery);
  </script>
  <script type="text/javascript" src="moo1.2.js"></script>
  <script type="text/javascript">
   //moo stuff

    window.addEvent('domready',function() {
      $$('p').setStyle('border','1px solid #fc0');
    });
  </script>

 

http://davidwalsh.name/jquery-mootools