<ul class="updates">
<script id="template" type="text/x-handlebars-template">
<li>
<h2>{{name}}</h2>
</li>
</script>
</ul>
<script src="js/jquery-1.11.1.js"></script>
<script src="js/handlebars-v1.3.0.js"></script>
<script type="text/javascript">
$(document).ready(function () {
var template = Handlebars.compile( $('#template').html() );
$('.updates').append( template(data) );
var data = {
name: 'Jane Doe'
}
});
</script>
var data = {
name: 'Jane Doe'
}
$('.updates').append( template(data) );