summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-FE/client/bower_components/jqTree/_entries/65_tree-contextmenu.md
blob: 9535c6cb3bba40922eca2967536e6062ee509b4d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
---
title: tree.contextmenu
name: event-tree-contextmenu
---

Triggered when the user right-clicks a tree node. The event contains the following properties:

* **node**: the node that is clicked on
* **click_event**: the original click event

{% highlight js %}
// bind 'tree.contextmenu' event
$('#tree1').bind(
    'tree.contextmenu',
    function(event) {
        // The clicked node is 'event.node'
        var node = event.node;
        alert(node.name);
    }
);
{% endhighlight %}