Solution 1 :

change title attr to data-title this do like this

$('.like').each(function () {
        let title = $(this).attr('data-title');
        $(this).tooltip({title: title, animation: true});
    });

Problem :

i use bootstrap tooltip like this

<i class="m-2 far fa-heart like" id="p-like" data-toggle="tooltip" data-placement="right" title="Please login"></i>

and i active that with this script

$('#p-like').tooltip();

but tooltip two times display. what is my mistake. thanks for you’r help.

enter image description here

Comments

Comment posted by Rob Moll

Remove the title attribute.

Comment posted by ali

so how to set message for tooltip?? @RobMoll

Comment posted by jsfiddle.net/cm80u9jk

I can’t reproduce the error

By

Leave a Reply

Your email address will not be published. Required fields are marked *