JSFiddle - React, Tailwind, and code Playground
by mwfire
HTML
<script src="https://raw.github.com/janl/mustache.js/master/mustache.js"></script>
<script id="tmpl" type="text/html">
<form>
<fieldset data-role="controlgroup">
<legend>{{legend}}</legend>
{{#items}}
<label for="{{id}}">{{#name}}{{name}}{{/name}}{{^name}}No name given{{/name}}</label>
<input type="checkbox" id="{{id}}" checked="{{#checked}}{{checked}}{{/checked}}" >
{{/items}}
</fieldset>
</form>
</script>
JavaScript
var preEnhance = $('<div>').hide().html($('#tmpl').html()).appendTo($('body')).trigger('create');
console.log(preEnhance.html());
var tmpl = Mustache.compile(preEnhance.html());
$('body').append(tmpl({legend: 'Pre Enhanced Forms?', items:[{id:'a',name:'A', checked: true},{id:'b',name:'B'},{id:'c'}]}))