Fires an event of the specified type. You can optionally provide an
data object — the first argument of the listener function will
contain its properties. The event can optionally be propagated to
event parents.
Removes a previously added listener function. If no function is
specified, it will remove all the listeners of that particular event
from the object. Note that if you passed a custom context to on, you
must pass the same context to off in order to remove the listener.
Adds a listener function (fn) to a particular event type of the
object. You can optionally specify the context of the listener
(object the this keyword will point to). You can also pass several
space-separated types (e.g. 'click dblclick').