90
rated 0 times
[
93]
[
3]
/ answers: 1 / hits: 25049
/ 13 Years ago, fri, april 1, 2011, 12:00:00
Is it possible to do this with Mustache.js?
var data = {val:3},
template = '<select>' +
'<option value=1>1</option>' +
'<option value=2>2</option>' +
'<option value=3>3</option>' +
'</select>';
var html = Mustache.to_html(template, data);
$(html).appendTo('body');
More From » jquery