0
votes

I am trying to render some items in a list using JsRender. See http://jsfiddle.net/arame3333/PTWnq/1/

I am not getting any feedback from jsFiddle as to why this is not working. What is the problem?

2

2 Answers

3
votes

Well, the debugger says:

GET http://borismoore.github.com/jsrender.js 404 (Not Found) 

The correct address would be:

http://borismoore.github.com/jsrender/jsrender.js

Then your braces are wrong:

$('#departmentList').html($('#DepartmentTemplate').render(data));

And the template has whitespace that breaks it, this is better:

<script id="DepartmentTemplate" type="text/x-jquery-tmpl">
      {{for BusinessUnitName}}
            <li>{{:#data}}</li>
      {{/for}}
</script>
1
votes

Look at you brackets, move one of them (from html to the end):

$('#departmentList').html($('#DepartmentTemplate').render(data));