Advertisement
Guest User

yan

a guest
Jan 14th, 2013
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.75 KB | None | 0 0
  1. <html
  2. <head>
  3. <script src="http://code.jquery.com/jquery-latest.js"></script>
  4. <script type="text/javascript" src="js/jquery.optionTree.js"></script>
  5. </head>
  6. <body>
  7.  
  8. <input type="hidden" name="demo2" />
  9. <script type="text/javascript">
  10. $(function() {
  11.     var option_tree = {"Option 1": {"Suboption": 200},
  12.                        "Option 2": {"Suboption 2": {"Subsub 1":201, "Subsub 2":202},
  13.                                     "Suboption 3": {"Subsub 3":203, "Subsub 4":204, "Subsub 5":205}}
  14.                        };
  15.  
  16.     var options = {empty_value: -1, choose: '...'};
  17.     $('input[name=demo2]').optionTree(option_tree, options)
  18.             .change(function() { alert('Field ' + this.name  + ' = ' + this.value )});
  19.  
  20. });
  21. </script>
  22.  
  23. </body>
  24. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement