简体   繁体   English

无法放置Twitter Bootstrap Tooltip

[英]Can't place Twitter Bootstrap Tooltip

See http://jsbin.com/ocufez/1/edit 请参阅http://jsbin.com/ocufez/1/edit

$('div').tooltip
  placement: 'right'

This is not placing tooltip at right side of div. 这不是将工具提示放在div的右侧。

How can I place the tooltip? 我该如何放置工具提示?

NOTE: You have to click run with JS and hover last div in JSBin 注意:您必须单击run with JS并将鼠标悬停在JSBin中的最后一个div

I think jQueryUI - jquery-ui.min.js is conflicting with bootstrap.js as they both have a .tooltip() If you remove jQueryUI you'll see the Bootstrap tooltip on the right. 我认为jQueryUI - jquery-ui.min.jsbootstrap.js冲突,因为它们都有.tooltip()如果删除jQueryUI,你会看到右边的Bootstrap工具提示。

or you can put jquery-ui.min.js before bootstrap.js... 或者你可以在bootstrap.js之前放置jquery-ui.min.js ...

<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"></script>
<script src="http://twitter.github.io/bootstrap/assets/js/bootstrap.js"></script>

Just try to add in element: 只是尝试添加元素:

data-toggle="tooltip" data-placement="right" title="" data-original-title="Tooltip on right"

Found in http://twitter.github.io/bootstrap/javascript.html#tooltips http://twitter.github.io/bootstrap/javascript.html#tooltips中找到

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM