Closed chkorn closed 10 years ago
Hi mate,
actually there is a method for being notified after the rendering is done, and it's registering a handler for the render.handlebars
event, which I trigger right after the rendering. The problem is that I forgot to document it. :P
Example:
$('#element').one('render.handlebars', function (template, data) {
console.dir(template);
console.dir(data);
}).render('template', {
data1: false,
data2: 'lalalala',
data3: 1234
});
I'm wondering whether to also allow a per-call callback like you did there, but I'm not sure.
Really thank you anyway for pointing out, I'll document the render.handlebars
event asap.
Argh! I was wondering about that trigger-part.. Thank you! :)
While playing with this plugin I had the problem, that after rendering a template I wanted to bind some event-handlers to the newly rendered markup. As I found no obvious way to wait for the rendering/$.get request to finish I added a callback method. Maybe this is something useful for others?
Regards Chris