you need to get a method to catch the value of the template template: below the codes only work on the html page:
var tmpl=$.trim($('#address_template').val());
Mustache.to_html (TMPL, JSON);
you need under the codes: " $. get ('template.html' ," your answer trick), you must first upload your template:
<!DOCTYPE html>
Names
<script> $(function() { $.getJSON('/data/speakers.json', function(data) {
$. get ('template.html', function (template, textStatus, jqXhr) {var info = Mustache.render ($ (template) .filter ('# speakers-template'). html (), data);. $ (' # ') Talktitles HTML (information);});
}); }); </script>
Penguen
source share