【发布时间】:2020-08-25 21:03:56
【问题描述】:
我正在使用Bootstrap 和jQuery 向应用程序添加一些组件。我还想为其中一些组件添加工具提示。我正在使用jQuery 在我的index.html 页面中显示工具提示:
<script>
$(function () {
$('[data-toggle="tooltip"]').tooltip()
})
</script>
要使用它,我只需将data-toggle="tooltip" title="Tooltip goes here" 添加到我想要应用工具提示的元素标记中。
我还有一个使用data-toggle="modal", which comes from Bootstrap` 启动模式的按钮。我不能简单地使用以下内容来添加工具提示和模式启动功能:
<button
type="button"
class="btn"
data-toggle="tooltip"
data-target="#exampleModalCenter"
data-toogle="modal"
title="This launches the Program Form window"
>
Sign Up!
</button>
在此按钮上获得工具提示和模态功能的简单方法是什么?
【问题讨论】:
标签: javascript jquery bootstrap-modal tooltip