Chapter 8. Elements

When working with JavaScript in the browser, the first and most important subject to learn is the DOM and its relationship to the JavaScript language. In fact, the bulk of the work done with browser-based JavaScript belongs to the category of DOM Scripting, a fancy term that basically means programming the DOM.

In this chapter, we'll learn about the DOM Tree, which is the representation of the HTML document as an object, and how to manipulate it through MooTools' DOM API. We'll also learn about the Element and Elements types, the two main type objects MooTools uses to add functionality to elements in the DOM Tree.

This chapter will guide you through the basics of DOM Scripting, and the concepts you learn here will be applied ...

Get Pro JavaScript with MooTools: Learning Advanced JavaScript Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.