Can anyone help me find this unexpected token? I've been looking at this code for a while so maybe i need a fresh pair of eyes to solve this. see HTML code below:
<div class="list-view hide">
<table class="custom-reports-table">
<script id="custom-reports-table" type="text/javascript">
<tbody>
{{#each listItem}}
<tr class="row" id="{{itemId}}">
<td class="select-container">
<div class="select-container">
<input id="{{itemId}}"type="checkbox" class="checkbox">
</div>
</td>
<td class="preview-container">
<i class="icon icon-pictos-115"></i>
<i class="icon icon-pictos-172"></i>
<i class="fa fa-asterisk report-type-icon"></i>
</td>
<td class="report-info">
<h3 class="report-name">{{itemName}}</h3>
<p class="summary">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt.
</p>
</td>
<td class="row-actions">
<a class="tooltip tip-btn-duplicate" href="#">
<span class="duplicate">Duplicate</span>
<i class="fa fa-copy btn-duplicate-item"></i>
</a>
<a class="tooltip tip-btn-generate" href="#">
<span class="generate">Generate</span>
<i class="fa fa-dot-circle-o btn-generate-item"></i>
</a>
<a class="tooltip tip-btn-schedule" href="#">
<span class="schedule">Schedule</span>
<i class="fa fa-clock-o btn-schedule-item"></i>
</a>
<a class="tooltip tip-btn-remove btn-remove-item" href="#">
<span class="remove-report">Remove</span>
<i class="fa fa-times-circle-o btn-remove-item"></i>
</a>
</td>
</tr>
{{/each}}
</tbody>
</script>
</table>
</div><!-- end of: .list-view-->
According to the console It looks like the error is somewhere related to the tbody but i can't find anything wrong. Anyone know what it might be? Thanks!
You need to set the
type
of<script>
correctly:If you're telling the browser to evaluate HTML as Javascript, of course you'll get syntax errors from the Javascript interpreter.