javascript - Bootstrap 工具提示未出现

标签 javascript jquery html css twitter-bootstrap

我已经通过了所有的 Stack Overflow,尝试了几乎任何东西。 工具提示不起作用。 你能帮帮我吗!!!

<!DOCTYPE html>
<html>

  <head>
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
    <script src="https://code.jquery.com/jquery-2.1.3.min.js"></script>

    <script>
      $(function() {
        $('[rel="tooltip"]').tooltip();
      });
    </script>
  </head>

  <body>
    <div class="container">
      <div class="btn-group">
        <button class="btn btn-default" rel="tooltip" title="hello" data-placement="bottom">Hello World</button>
      </div>
    </div>
  </body>

</html>

最佳答案

根据 dfsq 的评论 - 在 bootstrap js 文件之前添加 jQuery js 文件。

<script src="[jQuery JavaScript file]"></script>
<script src="[Bootstrap JavaScript file]"></script>

Bootstrap JS 文件基于 jQuery。 因此,为了确保一切正常 - 这是在 <head> 中添加脚本标记调用的顺序标签。

关于javascript - Bootstrap 工具提示未出现,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28764622/

相关文章:

php - 数据库更新问题,无法更新

javascript - 如何访问数组中随机对象的属性?

javascript - 在javascript中获取图像的高度

php - json_encode - JSON.parse() 组合,在 Firefox 中运行良好,但在其他浏览器中失败

javascript - 按计数和值对选择列表进行排序

javascript - 如何用空格替换文本区域中的换行符

javascript - 在不打开新窗口/标签的情况下使用谷歌身份验证登录

单击其他图像时,Javascript 禁用可单击图像

javascript - 基于类过滤 div,使用 jQuery

php - 使用mysql从数据库中检索数据