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

Summary


We learned a lot in this chapter. We learned about web browser events and how they can help us watch for, and react to, user actions. We saw events in action in web forms and in a mythical web application that allows users to toggle a help tip box with a shortcut key.

Specifically, we covered:

  • Adding event listeners to elements: We learned how to add a single event listener, as well as multiple event listeners, using the addEvent and addEvents methods. You'll find a lot of use for these as you get into the more advanced facets of MooTools.

  • Removing, cloning, and firing off events: We saw how to remove events from elements using the removeEvent and removeEvents methods, cloning events with the clone method, and systematically firing off events, even when they are not triggered by users, using the fireEvent method.

  • Creating custom events: We found out how to create custom events to extend MooTools' event object.

  • Event properties and methods: We saw the available methods and properties that...