Developer forum

Forum » Rapido » Handlebars events after rendering template

Handlebars events after rendering template

Aki Ruuskanen
Aki Ruuskanen
Reply

Hi,

Does anyone know if it's possible to fire javascript after a hadlebars template is rendered.

Example:

I have a handlebars-root like this. 

<div class="js-handlebars-root" id="VariantsListRoot" data-template="FamilyProductsContainer" data-json-feed="@variantsFeedUrl" data-preloader="minimal"></div> 

When I run the page it renders stuff that is in the template. 

I would like to run some javascript after the template is rendered. Possible?

Regards / Aki


Replies

 
Aki Ruuskanen
Aki Ruuskanen
Reply

I think I found it. 

Handlebars fires an "contentLoaded" event after content is rendered. 

Regards / Aki

 

You must be logged in to post in the forum