【发布时间】:2016-01-05 19:31:28
【问题描述】:
父模板onRendered 函数在子模板之前调用。子模板渲染后如何执行父模板功能。
<template name="parent">
{{#each object}}
{{> child}}
{{/each}}
</template>
<template name="child">
<img src="someurl" data-src="someurl">
</template>
现在我需要执行一些文档准备功能
Template.parent.onRendered(function() { // doesnt invokes after child template
$("img").unveil();
$(window).trigger("lookup");
});
【问题讨论】:
标签: javascript jquery meteor meteor-blaze