Sha256: 090bbda9d2e15be71b0cd4fece33af1c7b5e03a8c3b1688b28ee0a21052fc0f7
Contents?: true
Size: 749 Bytes
Versions: 7
Compression:
Stored size: 749 Bytes
Contents
--- title: tree.click name: event-tree-click --- Triggered when a tree node is clicked. The event contains the following properties: * **node**: the node that is clicked on * **click_event**: the original click event {% highlight js %} // create tree $('#tree1').tree({ data: data }); // bind 'tree.click' event $('#tree1').bind( 'tree.click', function(event) { // The clicked node is 'event.node' var node = event.node; alert(node.name); } ); {% endhighlight %} The default action is to select the node. You can prevent the selection by calling **preventDefault**: {% highlight js %} $('#tree1').bind( 'tree.click', function(event) { event.preventDefault(); } ); {% endhighlight %}
Version data entries
7 entries across 7 versions & 1 rubygems