Bootstrap 3 popover and tooltip on the same element

后端 未结 3 1541
自闭症患者
自闭症患者 2021-02-07 16:26

it is possible to use a tooltip and popover of Bootstrap 3 on the same element?

I have a table and want to show on each row (tr) a tooltip. Additionally I want to show

3条回答
  •  醉梦人生
    2021-02-07 17:06

    You dont have to use data-toggle, title and so on. Invoke the bootstrap plugins manually. See this example :

    qwertyqwertyqwertyqwerty
    qwertyqwertyqwertyqwerty

    script :

    $('tr').each(function() {
      $(this).popover({    
        content : $(this).attr("popover-content"),
        title : $(this).attr("popover-title")         
      })     
      $(this).tooltip({    
        placement : 'bottom',  
        title : $(this).attr("tooltip-title")         
      })     
    })
    

    demo fiddle -> http://jsfiddle.net/79fXt/

提交回复
热议问题