jQuery event.typeプロパティ
例
どのイベントタイプがトリガーされたかを返します:
$("p").on("click dblclick mouseover mouseout",function(event){
$("div").html("Event: " + event.type);
});
$("div").html("Event: " + event.type);
});
試してみる »
定義と使い方
event.type プロパティは、どのイベントタイプがトリガーされたかを返します。
構文
event.type
| 引数 | 説明 |
|---|---|
| event | 必須。event引数はイベントバインド関数から取得されます。 |
その他の拡張
jQuery イベントメソッド