Java Reference
In-Depth Information
<head>
<title>Chapter 15: Example 2 MooTools</title>
<script type=”text/javascript” src=”mootools-1.2.3-core-yc.js”></script>
<script type=”text/javascript”>
function window_domready()
{
$(document.body).setProperty(“bgColor”, “yellow”)
.set(“html”, “<h1>Hello, MooTools World!</h1>”);
}
window.addEvent(“domready”, window_domready);
</script>
</head>
<body>
</body>
</html>
Save this as ch15_examp2_mt.htm . Load it into your browser, and the page should look like
Figure 15-3.
Figure 15-3
If you get the results shown in Figure 15-3, then you've set up MooTools correctly. If not, make sure the
MooTools JavaScript fi le is located in the same directory as your HTML page.
Now that you have jQuery, Prototype, and MooTools installed and working correctly, you can begin to
delve deeper into the frameworks to get a better understanding of how you can benefi t by using them.
So come, young padawan, and take the crash course on jQuery, Prototype, and MooTools.
Search WWH ::




Custom Search