Callback Handlebars

0

Good morning guys, all bzl?

I render a grid with Handlebars, after that, I need to adjust the height of the cards and activate another jquery plugin for a select options that is rendered by Handlebars.

When I call the functions to adjust the height of the cards and activate that plugin, soon after the Handlebars process does not work, but if I put a setTimeout, most of the time it works, but then it depends on the speed of the internet, gambiarra master .... it bothers me too much.

I did not find references on callback regarding Handlebars.

Here's part of the code:

        var source   = $("#nome_template").html(); 
        var template = Handlebars.compile(source);
        $('#resultado_aplicacoes_favoritas').html(template(data));

        setTimeout(function() { 
            funcaoAuxiliar();//func que ajusta altura e ativa plugin do select options.
        }, 3000); 

Can anyone give a help?

Thanks

    
asked by anonymous 23.10.2018 / 15:34

0 answers