Here is an example of what I'm trying to accomplish, except that it uses lists (UL and LI): http://homework.nwsnet.de/news/ea21_turn-nested-lists-into-a-collapsible-tree-with -jquery
My data is structured using DL, DT, and DD tags, for example:
<dl>
<dt>Root</dt>
<dd>
<dl>
<dt>Coffee</dt>
<dd>black hot drink</dd>
<dt>Milk</dt>
<dd>white cold drink</dd>
<dt>Beer</dt>
<dd>
<dl>
<dt>European</dt>
<dd>Heineken</dd>
<dt>Mexican</dt>
<dd>Corona</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
How can I use jQuery to turn each DT (and its corresponding DD content) into a resettable / extensible node, i.e. treeview?
source
share