The largest part of most jQuery codebases. The on and off API, the full shorthand set, the normalised event object, and delegation — which is why jQuery code scales to dynamic content. Then the deprecated methods older code is full of, and what each translates to today.
Topics: on, off, one and the ready event · Mouse events — click, dblclick, mousedown, mouseup, mouseenter, mouseleave, mousemove, hover · Keyboard and form events — keydown, keypress, keyup, change, select, submit, focus, focusin, focusout, blur · Window events — load, resize, scroll and unload · The event object — target, currentTarget, delegateTarget, relatedTarget, pageX, pageY, which, type, timeStamp, data, namespace · preventDefault, stopPropagation, stopImmediatePropagation and their isolated checks · Event delegation with on and a selector · Deprecated and removed — bind, unbind, live, die, delegate, undelegate, toggle, error · trigger, triggerHandler and custom events
- Assignments: (1) Convert every bind, live and delegate call in a file to the on API; (2) Replace per-row handlers on a large table with a single delegated listener
- Capstone: Rebuild a page's event layer using delegation and namespacing, with clean teardown