How to detect eventType in jQuery?

To detect the eventType in jQuery, use the event type property. You can try to run the following code to learn how to detect eventType in jQuery −


Live Demo

<!DOCTYPE html>
<script src=""></script>
    $("p").on("mouseover mouseout",function(event){
        $("div").html("Event Type: " + event.type);

<p>This has mouseover and mouseout event defined. Keep your cursor to see the event type below.</p>