Skip to content

Update error.xml #630

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 7 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Deleted first example
  • Loading branch information
AurelioDeRosa committed Sep 23, 2015
commit 7cf36b26bf4ecdbc39ceaa666e039e2cc1ff7fea
11 changes: 0 additions & 11 deletions entries/error.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,6 @@ $( "#book" )
</div>
<p>Note: A jQuery <code>error</code> event handler should not be attached to the <code>window</code> object. The browser fires the <code>window</code>'s <code>error</code> event when a script error occurs. However, the window <code>error</code> event receives different arguments and has different return value requirements than conventional event handlers. Use <code>window.onerror</code> instead.</p>
</longdesc>
<example>
<desc>To hide the "broken image" icons for users of older versions of IE, you can write:</desc>
<code><![CDATA[
// missing.png is an hypothetical missing image used to trigger the error event
$( "img" )
.error(function() {
$( this ).hide();
})
.attr( "src", "missing.png" );
]]></code>
</example>
<example>
<desc>To replace all the missing images with another, you can update the <code>src</code> attribute inside the callback passed to <code>.error()</code>. Be sure that the replacement image exists; otherwise the <code>error</code> event will be triggered indefinitely.</desc>
<code><![CDATA[
Expand Down