I know meteor exposes events such as \"click\", for DOM element but I\'m wondering if there\'s a load event that\'s fired when a template or partial is loaded? How would I a
I'd recommend this rather than the accepted answer, slightly less gross IMHO:
{{aReactiveHelper}}
Template.temp.aReactiveHelper = function() {
var someValue = Session.get('someValue');
invokeAfterLoad();
return someValue;
};
var invokeAfterLoad = function () {
Meteor.defer(function () {
$('mydiv').doSomething();
});
};
The assumption is that you want to invoke something after the template loads because it's reacting to a reactive object.
The benefit here is you're not adding animation code to your template.