Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html
- <head>
- <script src="http://code.jquery.com/jquery-latest.js"></script>
- <script type="text/javascript" src="js/jquery.optionTree.js"></script>
- </head>
- <body>
- <input type="hidden" name="demo2" />
- <script type="text/javascript">
- $(function() {
- var option_tree = {"Option 1": {"Suboption": 200},
- "Option 2": {"Suboption 2": {"Subsub 1":201, "Subsub 2":202},
- "Suboption 3": {"Subsub 3":203, "Subsub 4":204, "Subsub 5":205}}
- };
- var options = {empty_value: -1, choose: '...'};
- $('input[name=demo2]').optionTree(option_tree, options)
- .change(function() { alert('Field ' + this.name + ' = ' + this.value )});
- });
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement