You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<desc>If this method is called, the default action of the event will not be triggered.</desc>
<longdesc>
<p>For example, clicked anchors will not take the browser to a new URL. We can use <a href="/event.isDefaultPrevented/"><code>event.isDefaultPrevented()</code></a> to determine if this method has been called by an event handler that was triggered by this event.</p>
</longdesc>
<example>
<desc>Cancel the default action (navigation) of the click.</desc>
<code><![CDATA[
$( "a" ).click(function( event ) {
event.preventDefault();
$( "<div>" )
.append( "default " + event.type + " prevented" )
.appendTo( "#log" );
});
]]></code>
<html><![CDATA[
<a href="http://jquery.com">default click action is prevented</a>