这是我的代码:http://jsfiddle.net/52VtD/7255/
<div class="progress">
<div class="progress-bar progress-bar-success" style="width: 10%" data-toggle="tooltip" data-placement="bottom">
<span class="sr-only">35% Complete (success)</span>
</div>
<div class="progress-bar progress-bar-warning progress-bar-striped" style="width: 50%" data-toggle="tooltip" data-placement="bottom">
<span class="sr-only">10% Complete (warning)</span>
</div>
<div class="progress-bar progress-bar-danger" style="width: 10%" data-toggle="tooltip" data-placement="bottom">
<span class="sr-only">10% Complete (danger)</span>
</div>
</div>
JavaScript的:
$(document).ready(function() {
$('.progress').tooltip();
});
虽然看起来不起作用,但工具提示并没有显示出来。任何人都可以解释我哪里出错了吗?
答案 0 :(得分:2)
您可以尝试这样的事情
$('.progress-bar[data-toggle="tooltip"]').tooltip({
animated: 'fade',
placement: 'bottom'
});
查看 FIDDLE