悬停时不显示工具提示

Tooltip not showing on hover

本文关键字:工具提示 显示 悬停      更新时间:2023-09-26

引导工具提示只显示在焦点上,而不是悬停。工具提示正确显示在右侧。使用Bootstrap 2.3.1。在<span>上使用data-trigger='focus'也没有任何影响。在Firefox中为我工作。不工作在Chrome 27。作品在Chrome 28(金丝雀)。

完整HTML:

<!doctype html>
<head>
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
    <script src="js/bootstrap.js"></script>
</head>
<body>
            <span class='qinfo' title="Message 1">(?)</span>
            <span class='qinfo' title="Message 2">(?)</span>
</body>

JS:

$('.qinfo').tooltip({'placement':'right','trigger':'hover'});

这是一个只发生在Chrome 27的问题。由于其他版本的Chrome没有问题,使用$('.qinfo').tooltip({'placement':'right','trigger':'hover'});的其他浏览器也没有问题。没什么可做的。

选项触发器是默认的悬停和焦点,所以你不需要设置。