Bind an event handler to the "error" JavaScript event.
This method is a shortcut for .on( "error", handler ).
As of jQuery 1.8, the .error() method is deprecated. Use .on( "error", handler ) to attach event handlers to the error event instead.
The error event is sent to elements, such as images, that are referenced by a document and loaded by the browser. It is called if the element was not loaded correctly.
For example, consider a page with a simple