Advertisement
Guest User

Untitled

a guest
Apr 24th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  3. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4. <html xmlns="http://www.w3.org/1999/xhtml"
  5.     xmlns:f="http://java.sun.com/jsf/core"
  6.     xmlns:h="http://java.sun.com/jsf/html">
  7.  
  8. <h:head>
  9.     <title>Caveat Emptor</title>
  10.     <meta name="viewport" content="width=device-width, initial-scale=1" />
  11.     <meta http-equiv="X-UA-Compatible" content="IE-edge" />
  12.     <h:outputStylesheet library="css" name="bootstrap.min.css"></h:outputStylesheet>
  13.  
  14.     <script src="https://code.jquery.com/jquery-3.2.1.js" />
  15.     <script src="resources/js/bootstrap-treeview.min.js" />
  16. </h:head>
  17. <h:body>
  18.     <div class="container">
  19.         <div class="navbar navbar-inverse">
  20.             <div class="navbar-brand">Caveat Emptor Categories Page</div>
  21.         </div>
  22.  
  23.         <div id="tree"></div>
  24.     </div>
  25.  
  26.     <script>function getTree() {
  27.           return [
  28.                   {
  29.                         text: "Parent 1",
  30.                         nodes: [
  31.                           {
  32.                             text: "Child 1",
  33.                             nodes: [
  34.                               {
  35.                                 text: "Grandchild 1"
  36.                               },
  37.                               {
  38.                                 text: "Grandchild 2"
  39.                               }
  40.                             ]
  41.                           },
  42.                           {
  43.                             text: "Child 2"
  44.                           }
  45.                         ]
  46.                       },
  47.                       {
  48.                         text: "Parent 2"
  49.                       },
  50.                       {
  51.                         text: "Parent 3"
  52.                       },
  53.                       {
  54.                         text: "Parent 4"
  55.                       },
  56.                       {
  57.                         text: "Parent 5"
  58.                       }
  59.                     ];
  60.         }
  61.    
  62.     jQuery(document).ready(function ($) {
  63.         $('#tree').treeview({data: getTree()});
  64.     });
  65.     </script>
  66.  
  67. </h:body>
  68. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement