2
I’ve read and tested several questions from here on stackoverflow pt e en and a few more issues on github but none of them helped me solve the problem.
I’m trying to set a tooltip inside the modal, but it just shows the title
and the tooltip is not set. As in the image below:
I already tested setar the tooltip when the modal is displayed. That way:
$(ele).on('shown.bs.modal', function () {
$('[data-toggle="tooltip"]').tooltip();
});
Didn’t work.
The html
of button
is that way:
<button class="btn btn-primary btn-select2" data-toggle="tooltip" type="button" data-placement="top" title="Selecionar todos"><i class="fas fa-check-double"></i></button>
Until then, neither the title
appearance.
Every time the modal is opened, I do a foreach to find these button (for another function) but I took advantage and I set again the title
, the data-original-title
and the tooltip
, in this way:
$('modal').find('.btn-select2').each(function() {
$(this).attr('title', 'Selecionar Todos');
$(this).attr('data-original-title', 'Selecionar Todos');
$(this).data('placement', 'top');
$(this).tooltip();
});
That’s when the title
equal in the image, but without success as to the tooltip
. Some way this can be solved?
Recently I had a similar problem because in some places I needed 2 trailers
data-toggle
, to resolve put attributes in HTML asdata-tooltip="tooltip"
and in the JS$('[data-tooltip="tooltip"]').tooltip()
. See if this solves.– Laércio Lopes
I tested that way, also unsuccessfully.
– Leonardo Theodoro
See if the answer code helps you.
– Laércio Lopes
Dude, what kind of component is that you’re wearing? He doesn’t look like anything standard Bootstrap3... check this guy’s documentation if he accepts this kind of tooltype customization
– hugocsl
It is a template that uses bootstrap, in relation to the template, it uses everything in the same way as boostrap
– Leonardo Theodoro