Bootstrap 3 工具提示或弹出框不起作用 [英] Bootstrap 3 Tooltips or Popovers doesn't work
问题描述
我有一个前端在 Twitter Bootstrap 3 中设计的 Django 应用程序.我的所有样式和 JS 都运行良好,包括模态等......但我一生都无法获得弹出框的工具提示做任何事....
I have a Django application with the front-end designed in Twitter Bootstrap 3. All of the my styling and JS is working fine including the modals, etc... But I cannot for the life of me get the tooltips of popovers to do anything....
我没有在 Firebug 中抛出任何错误.
I am not throwing any errors in Firebug.
这是我的包含顺序:
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script src="{{ STATIC_URL }}js/bootstrap.min.js"></script>
这是我直接从引导站点获取的工具提示的示例调用:
Here is my an example call for the tooltip I took straight from the bootstrap site:
<a href="#" data-toggle="tooltip" title="first tooltip">Hover over me</a>
还有其他人对这 2 个元素有问题吗?
Anyone else have trouble with the 2 elements?
我相当肯定这是我做过的蠢事.
I am fairly certain it is something dumb I've done.
Bootstrap 3 中提供的所有其他 JS 影响,如 modals &标签工作正常...
All other JS affects provided in Bootstrap 3 like the modals & tabs are working fine...
推荐答案
您只需要通过 javascript 启用工具提示:
You just need to enable the tooltip via javascript:
$('some id or class that you add to the above a tag').tooltip()
这篇关于Bootstrap 3 工具提示或弹出框不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!