Book Image

MooTools 1.2 Beginner's Guide

Book Image

MooTools 1.2 Beginner's Guide

Overview of this book

MooTools is a simple-to-use JavaScript library, ideal for people with basic JavaScript skills who want to elevate their web applications to a superior level. If you're a newcomer to MooTools looking to build dynamic, rich, and user-interactive web site applications this beginner's guide with its easy-to-follow step-by-step instructions is all you need to rapidly get to grips with MooTools.
Table of Contents (14 chapters)
MooTools 1.2 Beginner's Guide
Credits
About the Authors
About the Reviewer
Preface

Using MooTools classes


Now that you know how to create a class in MooTools, it'll be a piece of cake to use the already-existing classes in the MooTools framework. You've already used a MooTools class, whether you know it or not, with the Options class that we implemented in the Dogs class.

Let's look at another class, the Chain class, so that we can explore how to use MooTools classes. And we're going to hit three birds with one stone here: by covering the Chain class to see how MooTools classes work in general, you'll also discover a key concept in the MooTools framework—chainability, and be able to witness the power of the Chain class. Once we're done, it'll be a cinch to use other MooTools classes such as Fx class for animation effects (we'll cover in greater detail in a later chapter).

The concept of chainability

Alright, so you caught me, chainability isn't a real word. Chainability refers to MooTools' ability to chain functions in sequence. It follows the concept of a Stack, a data structure...