work.suroh.tk/node_modules/mustache/wrappers/jquery/mustache.js.post

14 lines
359 B
Plaintext
Raw Normal View History

2019-12-02 12:22:45 +00:00
$.mustache = function (template, view, partials) {
return Mustache.render(template, view, partials);
};
$.fn.mustache = function (view, partials) {
return $(this).map(function (i, elm) {
var template = $.trim($(elm).html());
var output = $.mustache(template, view, partials);
return $(output).get();
});
};
})(jQuery);