/ Published in: JavaScript
from here
Expand |
Embed | Plain Text
<!-- 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>
You need to login to post a comment.
