Home >>jQuery Tutorial >jQuery event.type Property

jQuery event.type Property

jQuery event.type Property

jQuery event.type property in jQuery is used to returns which event type was triggered.

Syntax:
event.type

Parameter Values

Parameter Description
event It is a required parameter and is used to the event parameter comes from the event binding function
Here is an Example of jQuery event.type Property:

<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$(".txt").on("click dblclick mouseover mouseout",function(event){
$("div").html("Event: " + event.type);
});
});
</script>
</head>
<body>
<p class="txt"><b>CLICK ME! HOVER ME</b></p>
<div />
</body>
</html>

Output:

CLICK ME! HOVER ME


No Sidebar ads