Bootstrap Tooltip Not Working with Font Awesome Icon

后端 未结 3 826
清歌不尽
清歌不尽 2021-01-18 02:03

I am using bootstrap tooltip but I cannot seem to get it to work with a font awesome icon.

I can get this to work:

 

        
3条回答
  •  甜味超标
    2021-01-18 02:45

    According to Bootstrap's documentation. You have to initialize the tooltip & popover functionality.

    $('[data-toggle="tooltip"]').tooltip();
    

    By the way, you don't need the HTML elements AND the Javascript. Just one or the other. I think (not sure fully) your icon may not be working because it renders with nothing between your a tags. You could try putting a   in there.

    I was able to get this to work:

提交回复
热议问题