Adding custom class to tooltip

后端 未结 8 956
一生所求
一生所求 2021-02-05 02:04

I want to style(css) some bootstrap-tooltip.js tooltips, without affecting all the tooltips. I have tried many different solutions but i allways end up adding a class to the ele

8条回答
  •  醉梦人生
    2021-02-05 02:50

    Alternative to this answer that works in case the selector returns many tooltips:

    $("[id$=amount]")
      .tooltip()
      .each((i, el)=> $(el).data('bs.tooltip').tip().addClass('test'));
    

    (it should be OK for bootstrap 2 and 3).

提交回复
热议问题