Bootstrap's tooltip moves table cells to right a bit on hover

后端 未结 2 1533
被撕碎了的回忆
被撕碎了的回忆 2021-02-03 16:37

I am using Bootstrap 3.1.1 for my project. Each cell in my table contains data like 000 or 111. On hover, I want to display this data as a tooltip. So

相关标签:
2条回答
  • 2021-02-03 17:12

    You can set the "data-container" at this way:

    // initalize boostrap tooltip
        $(function () {
            $('[data-toggle="tooltip"]').tooltip({
                container: 'body'
            })
        })
    
    0 讨论(0)
  • 2021-02-03 17:16

    You have to add the data-container="body" as per documentation.

    <td data-original-title="999" data-container="body"
     data-toggle="tooltip" data-placement="bottom" title="">
     &nbsp;
    </td>
    

    http://jsfiddle.net/uEqF2/2/

    0 讨论(0)
提交回复
热议问题