Sha256: bbc258fb9ef5428a4201ae2d8649c85dc190efac44774ce58e9c3b02f841c7af
Contents?: true
Size: 723 Bytes
Versions: 7
Compression:
Stored size: 723 Bytes
Contents
$(function() { var $tree = $('#tree1'); $tree.tree({ data: ExampleData.example_data, autoOpen: true }); $tree.bind( 'tree.click', function(e) { // Disable single selection e.preventDefault(); var selected_node = e.node; if (selected_node.id == undefined) { console.log('The multiple selection functions require that nodes have an id'); } if ($tree.tree('isNodeSelected', selected_node)) { $tree.tree('removeFromSelection', selected_node); } else { $tree.tree('addToSelection', selected_node); } } ); });
Version data entries
7 entries across 7 versions & 1 rubygems