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

What are events exactly?


Events are simply things that happen in our web pages. MooTools supports all HTML 4.01 event attributes like onclick and onmouseout, but the framework refers to them without the "on" prefix (click instead of onclick, mouseout instead of onmouseout).

What's neat about MooTools is that it not only extends HTML 4.01 event attributes with a few of its own, but also ensures that methods and functions that deal with web page events work across all web browsers by providing us with a solid, built-in object called events. Event is part of the native component of MooTools, and is also referred to as the "event hash".

Note

You can read the official W3C specifications on events in the HTML 4.01 Specification, section 18.2.3, under Intrinsic events: http://www.w3.org/TR/html401/interact/scripts.html#h-18.2.3

We'll go over all of the available event attributes in MooTools so that you can learn what stuff we can listen to. There are several events that we can detect or "listen to...