浏览代码

Allow context to be used as template. Maintain chainability.

tags/0.5.1
Phui Hock Michael Jackson 14 年前
父节点
当前提交
bfcc05a93f
共有 1 个文件被更改,包括 9 次插入1 次删除
  1. +9
    -1
      wrappers/jquery/jquery.mustache.js.tpl.post

+ 9
- 1
wrappers/jquery/jquery.mustache.js.tpl.post 查看文件

@@ -1,6 +1,14 @@

$.mustache = function(template, view, partials) {
$.mustache = function (template, view, partials) {
return Mustache.render(template, view, partials);
};

$.fn.mustache = function (view, partials) {
return $(this).map(function (i, elm) {
var template = $(elm).html().trim();
var output = $.mustache(template, view, partials);
return $(output).get();
});
};

})(jQuery);

正在加载...
取消
保存