<!doctype html>
<html>
<head>
<meta charset=utf-8/>
<title>Mustache</title>
<style>
h2 span { color: gray; font-size: .8em; }
</style>
</head>
<body>
<ul class="tweets">
<script id="entry-template" type="text/x-handlebars-template">
{{#each this}}/* var data*/
<li>
<h2>{{fullName author}}</h2>
<p>{{{tweet}}}</p>
{{#if quote}}
<h5>{{quote}}</h5>
{{else}}
<h5>Author doest not have a quote.</h5>
{{/if}}
</li>
{{/each}}
</script>
</ul>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
<script src="https://raw.github.com/wycats/handlebars.js/1.0.0/dist/handlebars.runtime.js"></script>
<script>
(function() {
var data = [
{
author:{first:'Jeffrey', last: 'Way'},
tweet:'30 Days to learn jquery Rocks',
age: 25,
quote: 'Never ever,ever,ever giver up.'
},
{
author:{first:'Jeffrey',last: 'Way'},
tweet:'<strong>30 Days</strong> to learn jquery Rocks',
age: 46
}
];
Handlebars.registerHelper('fullName',function( author){
return author.first +''+ author.last; /* function to a full name*/
});
var template = Handlebars.compile($('#template').html() );
$('ul.tweets').append(template(data) );
});
</script>
</body>
</html>
error: