mercredi 30 décembre 2015

Ember: Reinstantiate bootstrap tooltip after DOM change

I have an Ember app coupled with Bootstrap. I've got the tooltips working ok for the rest of my application, but it never instantiates for the elements that I have from within handlebars conditionals.

View

 didInsertElement: function(){
   Ember.$('[data-hover="tooltip"]').tooltip({trigger:'hover'});
 }

HBS

{{#if propertyIstrue}}
    <a href="#" title="Show Me Something" data-hover="tooltip" data-placement="left">Hover These</a>
{{/if}}

So basically propertyIsTrue is a property that gets set to true when the user clicks another button. When the link shows up, the tooltip isn't applied. I need to fix that some how.

I'm using Ember v1.13. Upgrading isn't an option right now.




Aucun commentaire:

Enregistrer un commentaire