event.isDefaultPrevented()


event.isDefaultPrevented()Возвращает: Boolean

Описание: Returns whether event.preventDefault() was ever called on this event object.

Example:

Checks whether event.preventDefault() was called.

1
2
3
4
5
$( "a" ).click(function( event ) {
alert( event.isDefaultPrevented() ); // false
event.preventDefault();
alert( event.isDefaultPrevented() ); // true
});