-
Book Overview & Buying
-
Table Of Contents
MooTools 1.2 Beginner's Guide
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...
Change the font size
Change margin width
Change background colour