How to use JQuery Event type Property

This article describe about jQuery Event type Property.
  • 2012

jQuery Event type Property

The type property define which type event triggered or define the nature of event.

Syntax

event.type

 

Parameter Description
event Required. It is define the event to check. event parameter comes from event binding method

Example

<!DOCTYPE html>

<html>

<head>

<script type="text/javascript" src="jquery.js"></script>

<script type="text/javascript">

    $(document).ready(function () {

        $("p").bind('click dblclick mouseover mouseout', function (event) {

            $("div").html("Event: " + event.type);

        });

    });

</script>

</head>

<body>

<p>On this paragraph you click, double-click, mouseover and mouseout <br />Then you trigger one of the events, the div below will display the event type.</p>

<div/>

</body>

</html>

 

Output

 

event type property pic27.jpg

 

Note: After double click on the paragraph output become.

 

event type property pic28.jpg

You may also want to read these related articles Click here

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

Categories

More Articles

© 2019 DotNetHeaven. All rights reserved.