How to make word bold in text given in bootstrap CSS / Jquery tooltip

I am trying to show a tooltip when loading above an image. I have some text in this tooltip that I need to make it bold.

I tried this from the source mentioned but didn't work creating me.

  <button class="infoTipsBox" type ="button" data-toggle="tooltip" data-placement="right"data-original-title='<b>big tooltip</b>'>      
  </button>

      

Js:

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

      

What am I doing wrong? In the above text in the attribute, title

I am trying to make the "tooltip" for live font in bold and rest in normal font. How can I achieve this?

+3


source to share


1 answer


As you can see in the official Bootstrap documentation for the tooltip

Name    |    Type       |    default  |    Description
----------------------------------------------------------------------------
html    |    boolean    |    false    |    Insert html into the tooltip. 
                                           If false, jquery text method 
                                           will be used to insert content 
                                           into the dom. Use text if you're 
                                           worried about XSS attacks.

      



so add data-html="true"

to your tooltip and this will allow HTML in your tooltip

+5


source







All Articles