/ Published in: JavaScript

from [here](http://net.tutsplus.com/tutorials/javascript-ajax/make-your-mootools-code-shorter-faster-and-stronger/ "")
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<!-- jquery gets the "$" method --> <script type="text/javascript" src="jquery-1.4.js" /> <!-- mootools doesn't steal the "$" method; instead, document.id will be used --> <script type="text/javascript" src="mootools.js" /> <!-- lets use them --> <script type="text/javascript"> //with jquery, grab all links, make then red $('a').css('color','red'); //with mootools, get the content div, set it's background color to pink document.id('content').setStyle('background','pink'); //with mootools, get the content div, set it's background color to pink //this time, we'll give mootools the "$" method (function($) { $('content').setStyle('background','pink'); })(document.id); </script>
Comments
