Example 1 — Basic .error(handler)
Official legacy pattern: bind, then set a missing src.
$("#book")
.error(function () {
$("#out").text("Handler for error called.");
})
.attr("src", "missing.png"); How It Works
- Bind.
.error(fn)registers the handler on#book. - Src. Setting
srcstarts the network load. - Fail. A missing resource fires the browser
errorevent.

