Tap on a <p> element to hide it:
The tap event is triggered when the user taps on an element.
Tip: The tap event is equivalent to the jQuery click() method.
Parameter | Description |
---|---|
function(event) | Required. Specifies the function to run when the tap event occurs. The function has an optional event object, which can contain any jQuery event properties (e.g. event.target, event.type, etc.) See jQuery Events Reference for more information. |
The
event object
Using the
event.target property to return which DOM element that triggered the tap event.