Bootstrap hint in ember.js

I have no problem when I use Twitter Bootstrap Tooltip in a simple html file. But when I try to do the same in my Ember app, something went wrong. I am trying to reproduce a piece of code here:

// Link in template <a id="xyz" rel="tooltip" title="My tooltip">LINK</a> // Ember View fragment didInsertElement: function() { this.$("a#xyz).tooltip(); this.$("a#xyz).click(function() { $(this).attr('data-original-title', 'Tooltip changed').tooltip('fixTitle'); }); } 

First, the tooltip style is different from the style on a single HTML page (black background and white small font). This is a large tooltip with a large font size appearing on the right.

Secondly, I cannot change the text of the tooltip by clicking the link, as I try to do in a click event. He mistakenly says "there is no such" fixTitle "method for the widget instance". But this code works fine in my single HTML file without Ember.

Any ideas? Thanks!

+4
source share
1 answer

Finally solved my problem. It was a conflict between libraries. I use Bootstrap, but I also had a jQuery UI. Both libraries have a tooltip component. I started with the jQuery user interface to have an autocomplete component. I already dropped it and replaced Bootstrap Typeahead.

+4
source

Source: https://habr.com/ru/post/1439113/


All Articles