Sha256: 150d4e248bbd18e84bf3e080347a08964311dbb45750a62b7ee9f1ca7b04b869
Contents?: true
Size: 738 Bytes
Versions: 7
Compression:
Stored size: 738 Bytes
Contents
--- title: data name: options-data --- Define the contents of the tree. The data is a nested array of objects. This option is required. It looks like this: {% highlight js %} var data = [ { label: 'node1', children: [ { label: 'child1' }, { label: 'child2' } ] }, { label: 'node2', children: [ { label: 'child3' } ] } ]; $('#tree1').tree({data: data}); {% endhighlight %} * label: label of a node (required) * children: array of child nodes (optional) You can also include other data in the objects. You can later access this data. For example, to add an id: {% highlight js %} { label: 'node1', id: 1 } {% endhighlight %}
Version data entries
7 entries across 7 versions & 1 rubygems