i have a simple js
Template.home.rendered = function() {
$(’.isotope’).isotope({
itemSelector: ‘.carta’,
masonry: {
gutter: 0
}
});
};
and i need to execute before the subscription is ready, i try to use in the blaze
{{#if Template.subscriptionsReady}}
<div class="isotope">>
{{#each recorrerArray}}
<div class="{{this.ancho}} carta" data-mH="{{this.ancho}}" >
<div class="editar">
<a href="/editar/{{this.tabla}}/{{this._id}}"><i class="fa fa-pencil"></i></a>
</div>
<a href="/{{this.tabla}}/{{this._id}}"><img src="uploads/{{this.imagen}}" alt="{{this.nombre}}"/></a>
</div>
{{/each}}
</div>
{{else}}
loading...
{{/if}}
but always the js is before the helper is render and the .isotope div is empty, how can solve this?