Bootstrap 3 Tooltip over Glyphicon

前端 未结 5 1329
梦如初夏
梦如初夏 2020-12-25 12:00

Not sure if this even possible, I am trying to invoke a tooltip over a glyphicon inside an input group, my code (which does not work) is;

5条回答
  •  情书的邮戳
    2020-12-25 12:42

    You can get a simple tooltip over the glyphicon using the title attribute (which is blank in your example).

    title="info"
    

    Working code

     // add this in your js
     // all the glyphicons having the class "my-tooltip" will show a tooltip if "title" attribute is present
     $(".my-tooltip").tooltip();
    
     
    

提交回复
热议问题