链接jquery模板appendTo方法

时间:2011-04-22 21:36:08

标签: jquery jquery-templates

是否可以像这样链接jQuery模板的appendTo方法:

 $("#total-costs-template").tmpl({ CurrentMortgage: vm.currentMortgage, Products: products }).appendTo("#total-costs-analysis").find("#total-costs-month").click(function () {

                        alert('test');

                    });

我记得以前做过但是在上面的代码中它没有用,但我也没有得到错误。

1 个答案:

答案 0 :(得分:4)

是,

$(a).appendTo(b)

返回一个等同于$(a)

的jQuery对象
相关问题