agsamantha/node_modules/mustache/wrappers/jquery/mustache.js.post
2024-10-02 15:15:21 -05:00

13 lines
359 B
Text

$.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);