表格td标签中弹出窗口提示的问题

Problems with popover tooltip in table td tag

本文关键字:窗口 提示 问题 td 标签 表格      更新时间:2023-09-26

这是我的,它工作得很好:

    <div style="padding:5px; border:solid 1px gray; width: 30px; height: 20px;" role="button" data-toggle="popover" data-content="test">
        <div class="tv-button"></div>
    </div>

但是如果我这样做:

<td>
        <div style="padding:5px; border:solid 1px gray; width: 30px; height: 20px;" role="button" data-toggle="popover" data-content="test">
            <div class="tv-button"></div>
        </div>
</td>

它停止工作了。

这是我在script中的内容:

    $("[data-toggle=popover]")
        .popover({
            placement: "top",
            trigger: "hover",
            html: true
    });
有谁知道是什么问题吗?

我意识到如果我在"tr"标签上做ng-repeat并重复许多"td"标签,它不起作用,在这种情况下它不起作用,没有ng-repeat它确实不起作用,我会创建JSfiddle,但因为我有很多html,我不想打扰你阅读…你们对此有什么结论吗?