redrawNavi was a one-line function invoked in only one place.
[mkws-moved-to-github.git] / tools / htdocs / handlebars-test.html
1 <html>
2   <head>
3     <script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
4     <script type="text/javascript" src="handlebars-v1.1.2.js"></script>
5     <script id="entry-template" type="text/x-handlebars-template">
6       <div class="entry">
7         <h1>{{title}}</h1>
8         <div class="body">
9           {{body}}
10         </div>
11       </div>
12     </script>
13   </head>
14   <body>
15     <div id="content"/>
16     <script type="text/javascript">
17       var source = $("#entry-template").html();
18       var template = Handlebars.compile(source);
19       var context = {title: "My New Post", body: "This is my first post!"}
20       var html = template(context);
21       $("#content").html(html);
22     </script>
23   </body>
24 </html>