JQuery Autotree

JQuery Autotree is a 1-line 248-byte javascript I wrote to to create a flexible tree-navigation style menu out of a standard UL-LI html list structure.

DEMO

HOW YOU CAN USE IT

  1. Download the latest JQuery package
  2. Download the JQuery Autotree script
  3. Anywhere AFTER your JQuery include line, include the Autotree script:
    <script type='text/javascript' src='autotree-min.js'></script>
  4. Have an unordered list (UL tag) somewhere on your page made up of the following structure defined below, and assign it a class of "autotree."
    <ul class='autotree'> <li>title of list item that triggers sublist A</li> <li> <ul> <li>SUB MENU ITEM 1</li> </ul> </li> </ul>
A working, stripped down demo can be found here.

Change requests? bugs? Make a submission to my contact form.