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...