Is there any way to pass function to bind into jQuery template engine? http://api.jquery.com/tmpl/
如果我没有模板就建立超文本,我就这样做:
jQuery("<a>link</a>").click(function(){alert( hi! )}).appendTo( "#forms_container" );
如何用j Query模板做到这一点?
------------EDIT I found some library here http://knockoutjs.com/documentation/template-binding.html
并且似乎像j Query.live()这样的东西。
是否有其他有约束力的职能模板,或者这种方式主要被用作违约?
-----------EDIT Ok, then let it be .delegate. I think for my small task it will be enough, without adding more complexity with Knockout