onbegin / onend Attributes

When the second list item is activated, the background-color of its
container node is changed -- see the color() function below.
The container's background color is reset to normal when the third list
item is deactivated.

function color(elt, bgcolor) {
elt.style.backgroundColor = bgcolor;
}

Our timesheet scheduler evaluates the contents of the
onbegin/onend attributes when it activates / deactivates a
target element. As with any other on[event] attribute, the
this statement refers to the element node.

addEventListener()

You can also set begin/end event listeners dynamically with
the standard addEventListener() method:

In this case, the last list item changes its container background color
when it's activated, and resets the background color to normal when it's
deactivated.

EVENTS.bind()

Neither addEventListener() nor custom events like
begin/end are supported by IE<9. If you want your HTML
Timing document to work on old IE versions, you'll have to use our
window.EVENTS object as an event management abstraction
layer: